diff --git a/.blazar.yaml b/.blazar.yaml index 28783f48407..509ea3e2c85 100644 --- a/.blazar.yaml +++ b/.blazar.yaml @@ -1,19 +1,17 @@ +buildpack: + name: Blazar-Buildpack-Java-single-module + branch: kubernetes_client_changes enabled: true env: SET_VERSION_OVERRIDE: $GIT_BRANCH-SNAPSHOT MAVEN_OPTS: -Xmx4096m - MAVEN_ARGS: -DskipTests -am -pl kubernetes-server-mock,kubernetes-model-generator,kubernetes-model-generator/kubernetes-model-apiextensions,kubernetes-client + MAVEN_ARGS: -DskipTests -am -pl kubernetes-server-mock,kubernetes-model-generator,kubernetes-model-generator/kubernetes-model-apiextensions,kubernetes-client,crd-generator/api,crd-generator/apt buildResources: cpus: 2 memoryMb: 5120 -buildpack: - host: git.hubteam.com - organization: HubSpot - repository: Blazar-Buildpack-Java - branch: v2-single-module provides: - name: kubernetes-client diff --git a/.build-jdk11 b/.build-jdk11 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/AdditionalPrinterColumnDetector.java b/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/AdditionalPrinterColumnDetector.java index 6f87a176bc6..754efe32bd2 100644 --- a/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/AdditionalPrinterColumnDetector.java +++ b/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/AdditionalPrinterColumnDetector.java @@ -25,7 +25,7 @@ public AdditionalPrinterColumnDetector() { } public AdditionalPrinterColumnDetector(String prefix) { - super(prefix, PrinterColumn.class.getSimpleName(), new ArrayList<>()); + super(prefix, PrinterColumn.class.getSimpleName()); } } diff --git a/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/AnnotatedMultiPropertyPathDetector.java b/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/AnnotatedMultiPropertyPathDetector.java index b821017f703..387353a7dfa 100644 --- a/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/AnnotatedMultiPropertyPathDetector.java +++ b/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/AnnotatedMultiPropertyPathDetector.java @@ -21,13 +21,18 @@ import io.sundr.model.Property; import io.sundr.model.TypeDef; import io.sundr.model.TypeDefBuilder; + +import java.util.ArrayDeque; import java.util.ArrayList; +import java.util.Deque; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; +import static io.fabric8.crd.generator.AbstractJsonSchema.ANNOTATION_JSON_IGNORE; + public class AnnotatedMultiPropertyPathDetector extends TypedVisitor { protected static final String DOT = "."; @@ -37,20 +42,24 @@ public class AnnotatedMultiPropertyPathDetector extends TypedVisitor parents; private final Map properties; + private final Deque toRun; public AnnotatedMultiPropertyPathDetector(String prefix, String annotationName) { - this(prefix, annotationName, new ArrayList<>()); - } - - public AnnotatedMultiPropertyPathDetector(String prefix, String annotationName, List parents) { - this(prefix, annotationName, parents, new HashMap<>()); + this(prefix, annotationName, new ArrayList<>(), new HashMap<>(), new ArrayDeque<>()); } - public AnnotatedMultiPropertyPathDetector(String prefix, String annotationName, List parents, Map properties) { + public AnnotatedMultiPropertyPathDetector(String prefix, String annotationName, List parents, + Map properties, Deque toRun) { this.prefix = prefix; this.annotationName = annotationName; this.parents = parents; this.properties = properties; + this.toRun = toRun; + } + + private boolean excludePropertyProcessing(Property p) { + return p.getAnnotations().stream() + .anyMatch(ann -> ann.getClassRef().getFullyQualifiedName().equals(ANNOTATION_JSON_IGNORE)); } @Override @@ -58,33 +67,37 @@ public void visit(TypeDefBuilder builder) { TypeDef type = builder.build(); final List props = type.getProperties(); for (Property p : props) { - if (parents.contains(p)) { - continue; - } + if (parents.contains(p)) { + continue; + } - List newParents = new ArrayList<>(parents); - boolean match = p.getAnnotations().stream().anyMatch(a -> a.getClassRef().getName().equals(annotationName)); - if (match) { - newParents.add(p); - this.properties - .put(newParents.stream().map(Property::getName).collect(Collectors.joining(DOT, prefix, "")), p); - } + List newParents = new ArrayList<>(parents); + boolean match = p.getAnnotations().stream().anyMatch(a -> a.getClassRef().getName().equals(annotationName)); + if (match) { + newParents.add(p); + this.properties + .put(newParents.stream().map(Property::getName).collect(Collectors.joining(DOT, prefix, "")), p); + } } props.stream().filter(p -> p.getTypeRef() instanceof ClassRef).forEach(p -> { - if (!parents.contains(p)) { - ClassRef classRef = (ClassRef) p.getTypeRef(); - TypeDef propertyType = Types.typeDefFrom(classRef); - if (!propertyType.isEnum()) { - List newParents = new ArrayList<>(parents); - newParents.add(p); - new TypeDefBuilder(propertyType) - .accept(new AnnotatedMultiPropertyPathDetector(prefix, annotationName, newParents, - this.properties)) - .build(); - } + if (!parents.contains(p) && !excludePropertyProcessing(p)) { + ClassRef classRef = (ClassRef) p.getTypeRef(); + TypeDef propertyType = Types.typeDefFrom(classRef); + if (!propertyType.isEnum() && !classRef.getPackageName().startsWith("java.")) { + List newParents = new ArrayList<>(parents); + newParents.add(p); + toRun.add(() -> new TypeDefBuilder(propertyType) + .accept(new AnnotatedMultiPropertyPathDetector(prefix, annotationName, newParents, properties, toRun))); } - }); + } + }); + + if (parents.isEmpty()) { + while (!toRun.isEmpty()) { + toRun.pop().run(); + } + } } public Set getPaths() { diff --git a/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/AnnotatedPropertyPathDetector.java b/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/AnnotatedPropertyPathDetector.java index 4ddfb7b3e5b..be261ccc447 100644 --- a/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/AnnotatedPropertyPathDetector.java +++ b/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/AnnotatedPropertyPathDetector.java @@ -17,16 +17,22 @@ import io.fabric8.crd.generator.utils.Types; import io.sundr.builder.TypedVisitor; +import io.sundr.model.AnnotationRef; import io.sundr.model.ClassRef; import io.sundr.model.Property; import io.sundr.model.TypeDef; import io.sundr.model.TypeDefBuilder; + +import java.util.ArrayDeque; import java.util.ArrayList; +import java.util.Deque; import java.util.List; import java.util.Optional; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; +import static io.fabric8.crd.generator.AbstractJsonSchema.ANNOTATION_JSON_IGNORE; + public class AnnotatedPropertyPathDetector extends TypedVisitor { protected static final String DOT = "."; @@ -35,59 +41,74 @@ public class AnnotatedPropertyPathDetector extends TypedVisitor private final String prefix; private final String annotationName; private final List parents; - private final AtomicReference> reference; + private final AtomicReference reference; + private final Deque toRun; public AnnotatedPropertyPathDetector(String prefix, String annotationName) { - this(prefix, annotationName, new ArrayList<>()); - } - - public AnnotatedPropertyPathDetector(String prefix, String annotationName, List parents) { - this(prefix, annotationName, parents, new AtomicReference<>(Optional.empty())); + this(prefix, annotationName, new ArrayList<>(), new AtomicReference<>(), new ArrayDeque<>()); } - public AnnotatedPropertyPathDetector(String prefix, String annotationName, List parents, AtomicReference> reference) { + public AnnotatedPropertyPathDetector(String prefix, String annotationName, List parents, + AtomicReference reference, Deque toRun) { this.prefix = prefix; this.annotationName = annotationName; this.parents = parents; this.reference = reference; + this.toRun = toRun; + } + + private static boolean excludePropertyProcessing(Property p) { + for (AnnotationRef annotation : p.getAnnotations()) { + if (annotation.getClassRef().getFullyQualifiedName().equals(ANNOTATION_JSON_IGNORE)) { + return true; + } + } + return false; } @Override public void visit(TypeDefBuilder builder) { TypeDef type = builder.build(); final List properties = type.getProperties(); + visitProperties(properties); + } + + private void visitProperties(List properties) { for (Property p : properties) { if (parents.contains(p)) { - continue; - } + continue; + } - List newParents = new ArrayList<>(parents); - boolean match = p.getAnnotations().stream().anyMatch(a -> a.getClassRef().getName().equals(annotationName)); + List newParents = new ArrayList<>(parents); + boolean match = false; + for (AnnotationRef annotation : p.getAnnotations()) { + match = annotation.getClassRef().getName().equals(annotationName); if (match) { newParents.add(p); - reference.set(Optional.of(newParents.stream().map(Property::getName).collect(Collectors.joining(DOT, prefix, "")))); + reference.set(newParents.stream().map(Property::getName).collect(Collectors.joining(DOT, prefix, ""))); return; } - } + } - properties.stream() - .filter(p -> p.getTypeRef() instanceof ClassRef) - .forEach(p -> { - if (!parents.contains(p)) { - ClassRef classRef = (ClassRef) p.getTypeRef(); - TypeDef propertyType = Types.typeDefFrom(classRef); - if (!propertyType.isEnum()) { - List newParents = new ArrayList<>(parents); - newParents.add(p); - new TypeDefBuilder(propertyType) - .accept(new AnnotatedPropertyPathDetector(prefix, annotationName, newParents, reference)) - .build(); - } + if (p.getTypeRef() instanceof ClassRef && !excludePropertyProcessing(p)) { + ClassRef classRef = (ClassRef) p.getTypeRef(); + TypeDef propertyType = Types.typeDefFrom(classRef); + if (!propertyType.isEnum() && !classRef.getPackageName().startsWith("java.")) { + newParents.add(p); + new TypeDefBuilder(propertyType) + .accept(new AnnotatedPropertyPathDetector(prefix, annotationName, newParents, reference, toRun)); } - }); + } + } + + if (parents.isEmpty()) { + while (!toRun.isEmpty() && reference.get() == null) { + toRun.pop().run(); + } + } } public Optional getPath() { - return reference.get(); + return Optional.ofNullable(reference.get()); } } diff --git a/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/LabelSelectorPathDetector.java b/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/LabelSelectorPathDetector.java index 216854795c2..6fdb308f34f 100644 --- a/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/LabelSelectorPathDetector.java +++ b/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/LabelSelectorPathDetector.java @@ -25,6 +25,6 @@ public LabelSelectorPathDetector() { } public LabelSelectorPathDetector(String prefix) { - super(prefix, LabelSelector.class.getSimpleName(), new ArrayList<>()); + super(prefix, LabelSelector.class.getSimpleName()); } } diff --git a/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/SpecReplicasPathDetector.java b/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/SpecReplicasPathDetector.java index 162d944fe6e..0c993a82cc9 100644 --- a/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/SpecReplicasPathDetector.java +++ b/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/SpecReplicasPathDetector.java @@ -24,6 +24,6 @@ public SpecReplicasPathDetector() { this(DOT); } public SpecReplicasPathDetector(String prefix) { - super(prefix, SpecReplicas.class.getSimpleName(), new ArrayList<>()); + super(prefix, SpecReplicas.class.getSimpleName()); } } diff --git a/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/StatusReplicasPathDetector.java b/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/StatusReplicasPathDetector.java index c23ee4d0708..5d533d6b408 100644 --- a/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/StatusReplicasPathDetector.java +++ b/crd-generator/api/src/main/java/io/fabric8/crd/generator/visitor/StatusReplicasPathDetector.java @@ -21,7 +21,7 @@ public class StatusReplicasPathDetector extends AnnotatedPropertyPathDetector { public StatusReplicasPathDetector(String prefix) { - super(prefix, StatusReplicas.class.getSimpleName(), new ArrayList<>()); + super(prefix, StatusReplicas.class.getSimpleName()); } diff --git a/crd-generator/api/src/test/java/io/fabric8/crd/example/map/ContainingMapsSpec.java b/crd-generator/api/src/test/java/io/fabric8/crd/example/map/ContainingMapsSpec.java index e09a7ee8f02..9d0e66652e5 100644 --- a/crd-generator/api/src/test/java/io/fabric8/crd/example/map/ContainingMapsSpec.java +++ b/crd-generator/api/src/test/java/io/fabric8/crd/example/map/ContainingMapsSpec.java @@ -15,6 +15,7 @@ */ package io.fabric8.crd.example.map; +import java.util.EnumMap; import java.util.List; import java.util.Map; @@ -32,4 +33,10 @@ public Map>> getTest2() { return test2; } + public enum Foo { + BAR + } + + private EnumMap enumToStringMap; + } diff --git a/crd-generator/api/src/test/java/io/fabric8/crd/generator/CRDGeneratorTest.java b/crd-generator/api/src/test/java/io/fabric8/crd/generator/CRDGeneratorTest.java index a1f96364356..accd511b043 100644 --- a/crd-generator/api/src/test/java/io/fabric8/crd/generator/CRDGeneratorTest.java +++ b/crd-generator/api/src/test/java/io/fabric8/crd/generator/CRDGeneratorTest.java @@ -275,7 +275,7 @@ void mapPropertyShouldHaveCorrectValueType() { final Map specProps = version.getSchema().getOpenAPIV3Schema() .getProperties().get("spec").getProperties(); - assertEquals(2, specProps.size()); + assertEquals(3, specProps.size()); checkMapProp(specProps, "test", "array"); String arrayType = specProps.get("test").getAdditionalProperties().getSchema().getItems().getSchema().getType(); 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 da930cd4bd0..d601531d83f 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 @@ -41,4 +41,9 @@ public V2beta1AutoscalingAPIGroupDSL v2beta1() { public V2beta2AutoscalingAPIGroupDSL v2beta2() { return adapt(V2beta2AutoscalingAPIGroupClient.class); } + + @Override + public V2AutoscalingAPIGroupDSL v2() { + return adapt(V2AutoscalingAPIGroupClient.class); + } } diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2AutoscalingAPIGroupClient.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2AutoscalingAPIGroupClient.java new file mode 100644 index 00000000000..1e0287a0c98 --- /dev/null +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2AutoscalingAPIGroupClient.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 io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscaler; +import io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerList; +import io.fabric8.kubernetes.client.dsl.MixedOperation; +import io.fabric8.kubernetes.client.dsl.Resource; + +public class V2AutoscalingAPIGroupClient extends BaseClient implements V2AutoscalingAPIGroupDSL { + + public V2AutoscalingAPIGroupClient() { + super(); + } + + public V2AutoscalingAPIGroupClient(ClientContext clientContext) { + super(clientContext); + } + + @Override + public MixedOperation> horizontalPodAutoscalers() { + return Handlers.getOperation(HorizontalPodAutoscaler.class, HorizontalPodAutoscalerList.class, this); + } +} diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2AutoscalingAPIGroupDSL.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2AutoscalingAPIGroupDSL.java new file mode 100644 index 00000000000..9f1ee9fc7b9 --- /dev/null +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2AutoscalingAPIGroupDSL.java @@ -0,0 +1,25 @@ +/** + * Copyright (C) 2015 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.fabric8.kubernetes.client; + +import io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscaler; +import io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerList; +import io.fabric8.kubernetes.client.dsl.MixedOperation; +import io.fabric8.kubernetes.client.dsl.Resource; + +public interface V2AutoscalingAPIGroupDSL extends Client { + MixedOperation> horizontalPodAutoscalers(); +} diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2AutoscalingAPIGroupExtensionAdapter.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2AutoscalingAPIGroupExtensionAdapter.java new file mode 100644 index 00000000000..d3fe1d28e96 --- /dev/null +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V2AutoscalingAPIGroupExtensionAdapter.java @@ -0,0 +1,35 @@ +/** + * Copyright (C) 2015 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.fabric8.kubernetes.client; + +public class V2AutoscalingAPIGroupExtensionAdapter extends APIGroupExtensionAdapter { + + @Override + protected String getAPIGroupName() { + return "autoscaling/v2"; + } + + @Override + public Class getExtensionType() { + return V2AutoscalingAPIGroupClient.class; + } + + @Override + protected V2AutoscalingAPIGroupClient newInstance(Client client) { + return new V2AutoscalingAPIGroupClient(client); + } + +} 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 7807475e0f5..6492b83b7fc 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 @@ -20,9 +20,11 @@ import io.fabric8.kubernetes.client.V1AutoscalingAPIGroupDSL; import io.fabric8.kubernetes.client.V2beta1AutoscalingAPIGroupDSL; import io.fabric8.kubernetes.client.V2beta2AutoscalingAPIGroupDSL; +import io.fabric8.kubernetes.client.V2AutoscalingAPIGroupDSL; public interface AutoscalingAPIGroupDSL extends Client { V1AutoscalingAPIGroupDSL v1(); V2beta1AutoscalingAPIGroupDSL v2beta1(); V2beta2AutoscalingAPIGroupDSL v2beta2(); + V2AutoscalingAPIGroupDSL v2(); } diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/BaseOperation.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/BaseOperation.java index 865b3d4dc3a..27d991c4123 100755 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/BaseOperation.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/BaseOperation.java @@ -17,6 +17,7 @@ import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.client.dsl.WritableOperation; +import io.fabric8.kubernetes.client.informers.cache.Reflector; import io.fabric8.kubernetes.client.utils.CreateOrReplaceHelper; import io.fabric8.kubernetes.client.utils.Serialization; import io.fabric8.kubernetes.api.builder.TypedVisitor; @@ -80,6 +81,9 @@ import java.util.function.Predicate; import java.util.function.UnaryOperator; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class BaseOperation, R extends Resource> extends CreateOnlyResourceOperation implements @@ -92,6 +96,8 @@ public class BaseOperation watcher) { config.getWatchReconnectLimit(), config.getWebsocketTimeout() ); + LOG.debug("Waiting for watch to become ready. Resource type: {}, version: {}", this.listType, this.resourceVersion); watch.waitUntilReady(); + LOG.debug("Watch became ready. Resource type: {}, version: {}", this.listType, this.resourceVersion); return watch; } catch (MalformedURLException e) { throw KubernetesClientException.launderThrowable(forOperationType(WATCH), e); @@ -593,6 +601,13 @@ public Watch watch(ListOptions options, final Watcher watcher) { // If the HTTP return code is 200 or 503, we retry the watch again using a persistent hanging // HTTP GET. This is meant to handle cases like kubectl local proxy which does not support // websockets. Issue: https://github.com/kubernetes/kubernetes/issues/25126 + LOG.warn( + "Watch attempt failed. Trying the watch again using a persistent hanging HTTP GET. " + + "Resource type: {}, version: {}", + this.listType, + this.resourceVersion, + ke + ); try { return new WatchHTTPManager<>( httpClient, diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/Reflector.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/Reflector.java index 47c7c570884..100e84e9223 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/Reflector.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/Reflector.java @@ -72,11 +72,14 @@ private synchronized void stopWatcher() { *
Should be called only at start and when HttpGone is seen. */ public void listSyncAndWatch() { + log.debug("Listing items for resource {}", apiTypeClass); running = true; KubernetesResourceList result = null; String continueVal = null; Set nextKeys = new LinkedHashSet<>(); + long listStartTimeNano = System.nanoTime(); do { + long chunkStartTimeNano = System.nanoTime(); result = listerWatcher .list(new ListOptionsBuilder().withLimit(listerWatcher.getLimit()).withContinue(continueVal).withAllowWatchBookmarks(false).build()); result.getItems().forEach(i -> { @@ -86,13 +89,21 @@ public void listSyncAndWatch() { nextKeys.add(key); }); continueVal = result.getMetadata().getContinue(); + log.debug( + "--- Listed chunk of {} items for resource {} in {}ms, result resource version: {}", + result.getItems().size(), + apiTypeClass, + (System.nanoTime() - chunkStartTimeNano) * 1e-6, + result.getMetadata().getResourceVersion() + ); } while (Utils.isNotNullOrEmpty(continueVal)); + long totalListTimeNano = System.nanoTime() - listStartTimeNano; store.retainAll(nextKeys); final String latestResourceVersion = result.getMetadata().getResourceVersion(); lastSyncResourceVersion = latestResourceVersion; - log.debug("Listing items ({}) for resource {} v{}", nextKeys.size(), apiTypeClass, latestResourceVersion); + log.debug("Listed items ({}) for resource {} v{} in {}ms", nextKeys.size(), apiTypeClass, latestResourceVersion, totalListTimeNano * 1e-6); startWatcher(latestResourceVersion); } @@ -100,7 +111,7 @@ private synchronized void startWatcher(final String latestResourceVersion) { if (!running) { return; } - log.debug("Starting watcher for resource {} v{}", apiTypeClass, latestResourceVersion); + log.debug("Starting watcher for resource {} v{}. Existing watch maybe: {}", apiTypeClass, latestResourceVersion, watch.get()); // there's no need to stop the old watch, that will happen automatically when this call completes watch.set( listerWatcher.watch(new ListOptionsBuilder().withResourceVersion(latestResourceVersion) @@ -131,9 +142,11 @@ class ReflectorWatcher implements Watcher { @Override public void eventReceived(Action action, T resource) { if (action == null) { + log.error("Watcher {} v{} received null action, throwing Unrecognized event error", apiTypeClass, lastSyncResourceVersion); throw new KubernetesClientException("Unrecognized event"); } if (resource == null) { + log.error("Watcher {} v{} received null resource, throwing Unrecognized resource error", apiTypeClass, lastSyncResourceVersion); throw new KubernetesClientException("Unrecognized resource"); } if (log.isDebugEnabled()) { @@ -148,6 +161,15 @@ public void eventReceived(Action action, T resource) { } switch (action) { case ERROR: + log.error( + "ERROR event received for watcher of {} v{}. Action: {}, resource: {}/{}, version: {}", + apiTypeClass, + lastSyncResourceVersion, + action.name(), + resource.getKind(), + resource.getMetadata().getName(), + resource.getMetadata().getResourceVersion() + ); throw new KubernetesClientException("ERROR event"); case ADDED: store.add(resource); @@ -169,15 +191,16 @@ public void onClose(WatcherException exception) { boolean restarted = false; try { if (exception.isHttpGone()) { - log.debug("Watch restarting due to http gone"); + log.debug("Watch for {} v{} restarting due to http gone.", apiTypeClass, lastSyncResourceVersion); listSyncAndWatch(); restarted = true; } else { - log.warn("Watch closing with exception", exception); + log.warn("Watch for {} v{} closing with exception", apiTypeClass, lastSyncResourceVersion, exception); running = false; // shouldn't happen, but it means the watch won't restart } } finally { if (!restarted) { + log.error("Watch for {} v{} wasn't restarted after an exception triggered the close", apiTypeClass, lastSyncResourceVersion); watchStopped(); // report the watch as stopped after a problem } } @@ -186,7 +209,7 @@ public void onClose(WatcherException exception) { @Override public void onClose() { watchStopped(); - log.debug("Watch gracefully closed"); + log.debug("Watch for {} v{} gracefully closed", apiTypeClass, lastSyncResourceVersion); } @Override 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 767f40ef7db..0ff96d913f1 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 @@ -24,6 +24,7 @@ io.fabric8.kubernetes.client.AuthorizationAPIGroupExtensionAdapter io.fabric8.kubernetes.client.V1AutoscalingAPIGroupExtensionAdapter io.fabric8.kubernetes.client.V2beta1AutoscalingAPIGroupExtensionAdapter io.fabric8.kubernetes.client.V2beta2AutoscalingAPIGroupExtensionAdapter +io.fabric8.kubernetes.client.V2AutoscalingAPIGroupExtensionAdapter io.fabric8.kubernetes.client.BatchAPIGroupExtensionAdapter io.fabric8.kubernetes.client.V1BatchAPIGroupExtensionAdapter io.fabric8.kubernetes.client.V1beta1BatchAPIGroupExtensionAdapter diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/cmd/generate/generate.go b/kubernetes-model-generator/kubernetes-model-autoscaling/cmd/generate/generate.go index 8169b13ce94..53ec28c7904 100644 --- a/kubernetes-model-generator/kubernetes-model-autoscaling/cmd/generate/generate.go +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/cmd/generate/generate.go @@ -24,6 +24,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" apimachineryversion "k8s.io/apimachinery/pkg/version" + autoscalingapiv2 "k8s.io/api/autoscaling/v2" autoscalingapiv1 "k8s.io/api/autoscaling/v1" autoscalingapiv2beta1 "k8s.io/api/autoscaling/v2beta1" autoscalingapiv2beta2 "k8s.io/api/autoscaling/v2beta2" @@ -58,6 +59,8 @@ type Schema struct { Quantity resource.Quantity Scale autoscalingapiv1.Scale + V2HorizontalPodAutoscaler autoscalingapiv2.HorizontalPodAutoscaler + V2HorizontalPodAutoscalerList autoscalingapiv2.HorizontalPodAutoscalerList V1HorizontalPodAutoscaler autoscalingapiv1.HorizontalPodAutoscaler V1HorizontalPodAutoscalerList autoscalingapiv1.HorizontalPodAutoscalerList V2beta1HorizontalPodAutoscaler autoscalingapiv2beta1.HorizontalPodAutoscaler @@ -76,6 +79,7 @@ func main() { {"k8s.io/api/autoscaling/v2beta2", "autoscaling", "io.fabric8.kubernetes.api.model.autoscaling.v2beta2", "kubernetes_autoscaling_v2beta2_", true}, {"k8s.io/api/autoscaling/v2beta1", "autoscaling", "io.fabric8.kubernetes.api.model.autoscaling.v2beta1", "kubernetes_autoscaling_v2beta1_", true}, {"k8s.io/api/autoscaling/v1", "autoscaling", "io.fabric8.kubernetes.api.model.autoscaling.v1", "kubernetes_autoscaling_v1_", true}, + {"k8s.io/api/autoscaling/v2", "autoscaling", "io.fabric8.kubernetes.api.model.autoscaling.v2", "kubernetes_autoscaling_v2_", true}, } typeMap := map[reflect.Type]reflect.Type{ diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java index 6185d5b8ba2..1178997af40 100644 --- a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java @@ -53,6 +53,8 @@ "UpdateOptions", "V1HorizontalPodAutoscaler", "V1HorizontalPodAutoscalerList", + "V2HorizontalPodAutoscaler", + "V2HorizontalPodAutoscalerList", "V2beta1HorizontalPodAutoscaler", "V2beta1HorizontalPodAutoscalerList", "V2beta2HorizontalPodAutoscaler", @@ -118,6 +120,10 @@ public class KubeSchema { private io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscaler v1HorizontalPodAutoscaler; @JsonProperty("V1HorizontalPodAutoscalerList") private io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerList v1HorizontalPodAutoscalerList; + @JsonProperty("V2HorizontalPodAutoscaler") + private io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscaler v2HorizontalPodAutoscaler; + @JsonProperty("V2HorizontalPodAutoscalerList") + private io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerList v2HorizontalPodAutoscalerList; @JsonProperty("V2beta1HorizontalPodAutoscaler") private io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler v2beta1HorizontalPodAutoscaler; @JsonProperty("V2beta1HorizontalPodAutoscalerList") @@ -139,31 +145,33 @@ public KubeSchema() { /** * * @param listOptions - * @param v1HorizontalPodAutoscalerList * @param aPIGroupList - * @param patchOptions - * @param deleteOptions - * @param quantity - * @param v2beta2HorizontalPodAutoscalerList * @param baseKubernetesList * @param scale * @param updateOptions * @param v1HorizontalPodAutoscaler - * @param createOptions * @param patch + * @param v2beta1HorizontalPodAutoscalerList + * @param v2beta1HorizontalPodAutoscaler + * @param rootPaths + * @param info + * @param v1HorizontalPodAutoscalerList + * @param patchOptions + * @param deleteOptions + * @param quantity + * @param v2beta2HorizontalPodAutoscalerList + * @param v2HorizontalPodAutoscaler + * @param createOptions * @param aPIGroup * @param typeMeta - * @param v2beta1HorizontalPodAutoscalerList * @param v2beta2HorizontalPodAutoscaler - * @param v2beta1HorizontalPodAutoscaler + * @param v2HorizontalPodAutoscalerList * @param objectMeta - * @param rootPaths * @param getOptions * @param time - * @param info * @param status */ - public KubeSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, BaseKubernetesList baseKubernetesList, CreateOptions createOptions, DeleteOptions deleteOptions, GetOptions getOptions, Info info, ListOptions listOptions, io.fabric8.kubernetes.api.model.ObjectMeta objectMeta, Patch patch, PatchOptions patchOptions, Quantity quantity, RootPaths rootPaths, Scale scale, Status status, String time, TypeMeta typeMeta, UpdateOptions updateOptions, io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscaler v1HorizontalPodAutoscaler, io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerList v1HorizontalPodAutoscalerList, io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler v2beta1HorizontalPodAutoscaler, io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerList v2beta1HorizontalPodAutoscalerList, io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscaler v2beta2HorizontalPodAutoscaler, io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerList v2beta2HorizontalPodAutoscalerList) { + public KubeSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, BaseKubernetesList baseKubernetesList, CreateOptions createOptions, DeleteOptions deleteOptions, GetOptions getOptions, Info info, ListOptions listOptions, io.fabric8.kubernetes.api.model.ObjectMeta objectMeta, Patch patch, PatchOptions patchOptions, Quantity quantity, RootPaths rootPaths, Scale scale, Status status, String time, TypeMeta typeMeta, UpdateOptions updateOptions, io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscaler v1HorizontalPodAutoscaler, io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerList v1HorizontalPodAutoscalerList, io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscaler v2HorizontalPodAutoscaler, io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerList v2HorizontalPodAutoscalerList, io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler v2beta1HorizontalPodAutoscaler, io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerList v2beta1HorizontalPodAutoscalerList, io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscaler v2beta2HorizontalPodAutoscaler, io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerList v2beta2HorizontalPodAutoscalerList) { super(); this.aPIGroup = aPIGroup; this.aPIGroupList = aPIGroupList; @@ -185,6 +193,8 @@ public KubeSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, BaseKubernetesLi this.updateOptions = updateOptions; this.v1HorizontalPodAutoscaler = v1HorizontalPodAutoscaler; this.v1HorizontalPodAutoscalerList = v1HorizontalPodAutoscalerList; + this.v2HorizontalPodAutoscaler = v2HorizontalPodAutoscaler; + this.v2HorizontalPodAutoscalerList = v2HorizontalPodAutoscalerList; this.v2beta1HorizontalPodAutoscaler = v2beta1HorizontalPodAutoscaler; this.v2beta1HorizontalPodAutoscalerList = v2beta1HorizontalPodAutoscalerList; this.v2beta2HorizontalPodAutoscaler = v2beta2HorizontalPodAutoscaler; @@ -391,6 +401,26 @@ public void setV1HorizontalPodAutoscalerList(io.fabric8.kubernetes.api.model.aut this.v1HorizontalPodAutoscalerList = v1HorizontalPodAutoscalerList; } + @JsonProperty("V2HorizontalPodAutoscaler") + public io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscaler getV2HorizontalPodAutoscaler() { + return v2HorizontalPodAutoscaler; + } + + @JsonProperty("V2HorizontalPodAutoscaler") + public void setV2HorizontalPodAutoscaler(io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscaler v2HorizontalPodAutoscaler) { + this.v2HorizontalPodAutoscaler = v2HorizontalPodAutoscaler; + } + + @JsonProperty("V2HorizontalPodAutoscalerList") + public io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerList getV2HorizontalPodAutoscalerList() { + return v2HorizontalPodAutoscalerList; + } + + @JsonProperty("V2HorizontalPodAutoscalerList") + public void setV2HorizontalPodAutoscalerList(io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerList v2HorizontalPodAutoscalerList) { + this.v2HorizontalPodAutoscalerList = v2HorizontalPodAutoscalerList; + } + @JsonProperty("V2beta1HorizontalPodAutoscaler") public io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler getV2beta1HorizontalPodAutoscaler() { return v2beta1HorizontalPodAutoscaler; diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ContainerResourceMetricSource.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ContainerResourceMetricSource.java new file mode 100644 index 00000000000..666a67783e6 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ContainerResourceMetricSource.java @@ -0,0 +1,130 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "container", + "name", + "target" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class ContainerResourceMetricSource implements KubernetesResource +{ + + @JsonProperty("container") + private String container; + @JsonProperty("name") + private String name; + @JsonProperty("target") + private MetricTarget target; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public ContainerResourceMetricSource() { + } + + /** + * + * @param container + * @param name + * @param target + */ + public ContainerResourceMetricSource(String container, String name, MetricTarget target) { + super(); + this.container = container; + this.name = name; + this.target = target; + } + + @JsonProperty("container") + public String getContainer() { + return container; + } + + @JsonProperty("container") + public void setContainer(String container) { + this.container = container; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + @JsonProperty("target") + public MetricTarget getTarget() { + return target; + } + + @JsonProperty("target") + public void setTarget(MetricTarget target) { + this.target = target; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ContainerResourceMetricStatus.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ContainerResourceMetricStatus.java new file mode 100644 index 00000000000..5e2369fbbe8 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ContainerResourceMetricStatus.java @@ -0,0 +1,130 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "container", + "current", + "name" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class ContainerResourceMetricStatus implements KubernetesResource +{ + + @JsonProperty("container") + private String container; + @JsonProperty("current") + private MetricValueStatus current; + @JsonProperty("name") + private String name; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public ContainerResourceMetricStatus() { + } + + /** + * + * @param container + * @param current + * @param name + */ + public ContainerResourceMetricStatus(String container, MetricValueStatus current, String name) { + super(); + this.container = container; + this.current = current; + this.name = name; + } + + @JsonProperty("container") + public String getContainer() { + return container; + } + + @JsonProperty("container") + public void setContainer(String container) { + this.container = container; + } + + @JsonProperty("current") + public MetricValueStatus getCurrent() { + return current; + } + + @JsonProperty("current") + public void setCurrent(MetricValueStatus current) { + this.current = current; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/CrossVersionObjectReference.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/CrossVersionObjectReference.java new file mode 100644 index 00000000000..5edc5814523 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/CrossVersionObjectReference.java @@ -0,0 +1,128 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "name" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class CrossVersionObjectReference implements KubernetesResource +{ + + @JsonProperty("apiVersion") + private String apiVersion; + @JsonProperty("kind") + private String kind; + @JsonProperty("name") + private String name; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public CrossVersionObjectReference() { + } + + /** + * + * @param apiVersion + * @param kind + * @param name + */ + public CrossVersionObjectReference(String apiVersion, String kind, String name) { + super(); + this.apiVersion = apiVersion; + this.kind = kind; + this.name = name; + } + + @JsonProperty("apiVersion") + public String getApiVersion() { + return apiVersion; + } + + @JsonProperty("apiVersion") + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + @JsonProperty("kind") + public String getKind() { + return kind; + } + + @JsonProperty("kind") + public void setKind(String kind) { + this.kind = kind; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ExternalMetricSource.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ExternalMetricSource.java new file mode 100644 index 00000000000..79182e8769d --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ExternalMetricSource.java @@ -0,0 +1,115 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "metric", + "target" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class ExternalMetricSource implements KubernetesResource +{ + + @JsonProperty("metric") + private MetricIdentifier metric; + @JsonProperty("target") + private MetricTarget target; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public ExternalMetricSource() { + } + + /** + * + * @param metric + * @param target + */ + public ExternalMetricSource(MetricIdentifier metric, MetricTarget target) { + super(); + this.metric = metric; + this.target = target; + } + + @JsonProperty("metric") + public MetricIdentifier getMetric() { + return metric; + } + + @JsonProperty("metric") + public void setMetric(MetricIdentifier metric) { + this.metric = metric; + } + + @JsonProperty("target") + public MetricTarget getTarget() { + return target; + } + + @JsonProperty("target") + public void setTarget(MetricTarget target) { + this.target = target; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ExternalMetricStatus.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ExternalMetricStatus.java new file mode 100644 index 00000000000..35a21b9ff1f --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ExternalMetricStatus.java @@ -0,0 +1,115 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "current", + "metric" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class ExternalMetricStatus implements KubernetesResource +{ + + @JsonProperty("current") + private MetricValueStatus current; + @JsonProperty("metric") + private MetricIdentifier metric; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public ExternalMetricStatus() { + } + + /** + * + * @param current + * @param metric + */ + public ExternalMetricStatus(MetricValueStatus current, MetricIdentifier metric) { + super(); + this.current = current; + this.metric = metric; + } + + @JsonProperty("current") + public MetricValueStatus getCurrent() { + return current; + } + + @JsonProperty("current") + public void setCurrent(MetricValueStatus current) { + this.current = current; + } + + @JsonProperty("metric") + public MetricIdentifier getMetric() { + return metric; + } + + @JsonProperty("metric") + public void setMetric(MetricIdentifier metric) { + this.metric = metric; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HPAScalingPolicy.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HPAScalingPolicy.java new file mode 100644 index 00000000000..66c8ce6f296 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HPAScalingPolicy.java @@ -0,0 +1,130 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "periodSeconds", + "type", + "value" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class HPAScalingPolicy implements KubernetesResource +{ + + @JsonProperty("periodSeconds") + private Integer periodSeconds; + @JsonProperty("type") + private String type; + @JsonProperty("value") + private Integer value; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public HPAScalingPolicy() { + } + + /** + * + * @param periodSeconds + * @param type + * @param value + */ + public HPAScalingPolicy(Integer periodSeconds, String type, Integer value) { + super(); + this.periodSeconds = periodSeconds; + this.type = type; + this.value = value; + } + + @JsonProperty("periodSeconds") + public Integer getPeriodSeconds() { + return periodSeconds; + } + + @JsonProperty("periodSeconds") + public void setPeriodSeconds(Integer periodSeconds) { + this.periodSeconds = periodSeconds; + } + + @JsonProperty("type") + public String getType() { + return type; + } + + @JsonProperty("type") + public void setType(String type) { + this.type = type; + } + + @JsonProperty("value") + public Integer getValue() { + return value; + } + + @JsonProperty("value") + public void setValue(Integer value) { + this.value = value; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HPAScalingRules.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HPAScalingRules.java new file mode 100644 index 00000000000..228f49708da --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HPAScalingRules.java @@ -0,0 +1,133 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "policies", + "selectPolicy", + "stabilizationWindowSeconds" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class HPAScalingRules implements KubernetesResource +{ + + @JsonProperty("policies") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List policies = new ArrayList(); + @JsonProperty("selectPolicy") + private String selectPolicy; + @JsonProperty("stabilizationWindowSeconds") + private Integer stabilizationWindowSeconds; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public HPAScalingRules() { + } + + /** + * + * @param selectPolicy + * @param stabilizationWindowSeconds + * @param policies + */ + public HPAScalingRules(List policies, String selectPolicy, Integer stabilizationWindowSeconds) { + super(); + this.policies = policies; + this.selectPolicy = selectPolicy; + this.stabilizationWindowSeconds = stabilizationWindowSeconds; + } + + @JsonProperty("policies") + public List getPolicies() { + return policies; + } + + @JsonProperty("policies") + public void setPolicies(List policies) { + this.policies = policies; + } + + @JsonProperty("selectPolicy") + public String getSelectPolicy() { + return selectPolicy; + } + + @JsonProperty("selectPolicy") + public void setSelectPolicy(String selectPolicy) { + this.selectPolicy = selectPolicy; + } + + @JsonProperty("stabilizationWindowSeconds") + public Integer getStabilizationWindowSeconds() { + return stabilizationWindowSeconds; + } + + @JsonProperty("stabilizationWindowSeconds") + public void setStabilizationWindowSeconds(Integer stabilizationWindowSeconds) { + this.stabilizationWindowSeconds = stabilizationWindowSeconds; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscaler.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscaler.java new file mode 100644 index 00000000000..f83e89c66c4 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscaler.java @@ -0,0 +1,196 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.HasMetadata; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.Namespaced; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.fabric8.kubernetes.model.annotation.Group; +import io.fabric8.kubernetes.model.annotation.Version; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import io.sundr.transform.annotations.TemplateTransformation; +import io.sundr.transform.annotations.TemplateTransformations; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "spec", + "status" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(io.fabric8.kubernetes.api.model.ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@Version("v2") +@Group("autoscaling") +@TemplateTransformations({ + @TemplateTransformation(value = "/manifest.vm", outputPath = "autoscaling.properties", gather = true) +}) +public class HorizontalPodAutoscaler implements HasMetadata, Namespaced +{ + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + private String apiVersion = "autoscaling/v2"; + /** + * + * (Required) + * + */ + @JsonProperty("kind") + private String kind = "HorizontalPodAutoscaler"; + @JsonProperty("metadata") + private io.fabric8.kubernetes.api.model.ObjectMeta metadata; + @JsonProperty("spec") + private HorizontalPodAutoscalerSpec spec; + @JsonProperty("status") + private HorizontalPodAutoscalerStatus status; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public HorizontalPodAutoscaler() { + } + + /** + * + * @param metadata + * @param apiVersion + * @param kind + * @param spec + * @param status + */ + public HorizontalPodAutoscaler(String apiVersion, String kind, io.fabric8.kubernetes.api.model.ObjectMeta metadata, HorizontalPodAutoscalerSpec spec, HorizontalPodAutoscalerStatus status) { + super(); + this.apiVersion = apiVersion; + this.kind = kind; + this.metadata = metadata; + this.spec = spec; + this.status = status; + } + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + public String getApiVersion() { + return apiVersion; + } + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + /** + * + * (Required) + * + */ + @JsonProperty("kind") + public String getKind() { + return kind; + } + + /** + * + * (Required) + * + */ + @JsonProperty("kind") + public void setKind(String kind) { + this.kind = kind; + } + + @JsonProperty("metadata") + public io.fabric8.kubernetes.api.model.ObjectMeta getMetadata() { + return metadata; + } + + @JsonProperty("metadata") + public void setMetadata(io.fabric8.kubernetes.api.model.ObjectMeta metadata) { + this.metadata = metadata; + } + + @JsonProperty("spec") + public HorizontalPodAutoscalerSpec getSpec() { + return spec; + } + + @JsonProperty("spec") + public void setSpec(HorizontalPodAutoscalerSpec spec) { + this.spec = spec; + } + + @JsonProperty("status") + public HorizontalPodAutoscalerStatus getStatus() { + return status; + } + + @JsonProperty("status") + public void setStatus(HorizontalPodAutoscalerStatus status) { + this.status = status; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscalerBehavior.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscalerBehavior.java new file mode 100644 index 00000000000..34a888c3d88 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscalerBehavior.java @@ -0,0 +1,115 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "scaleDown", + "scaleUp" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class HorizontalPodAutoscalerBehavior implements KubernetesResource +{ + + @JsonProperty("scaleDown") + private HPAScalingRules scaleDown; + @JsonProperty("scaleUp") + private HPAScalingRules scaleUp; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public HorizontalPodAutoscalerBehavior() { + } + + /** + * + * @param scaleUp + * @param scaleDown + */ + public HorizontalPodAutoscalerBehavior(HPAScalingRules scaleDown, HPAScalingRules scaleUp) { + super(); + this.scaleDown = scaleDown; + this.scaleUp = scaleUp; + } + + @JsonProperty("scaleDown") + public HPAScalingRules getScaleDown() { + return scaleDown; + } + + @JsonProperty("scaleDown") + public void setScaleDown(HPAScalingRules scaleDown) { + this.scaleDown = scaleDown; + } + + @JsonProperty("scaleUp") + public HPAScalingRules getScaleUp() { + return scaleUp; + } + + @JsonProperty("scaleUp") + public void setScaleUp(HPAScalingRules scaleUp) { + this.scaleUp = scaleUp; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscalerCondition.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscalerCondition.java new file mode 100644 index 00000000000..05e28687953 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscalerCondition.java @@ -0,0 +1,160 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "lastTransitionTime", + "message", + "reason", + "status", + "type" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class HorizontalPodAutoscalerCondition implements KubernetesResource +{ + + @JsonProperty("lastTransitionTime") + private String lastTransitionTime; + @JsonProperty("message") + private java.lang.String message; + @JsonProperty("reason") + private java.lang.String reason; + @JsonProperty("status") + private java.lang.String status; + @JsonProperty("type") + private java.lang.String type; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public HorizontalPodAutoscalerCondition() { + } + + /** + * + * @param reason + * @param lastTransitionTime + * @param message + * @param type + * @param status + */ + public HorizontalPodAutoscalerCondition(String lastTransitionTime, java.lang.String message, java.lang.String reason, java.lang.String status, java.lang.String type) { + super(); + this.lastTransitionTime = lastTransitionTime; + this.message = message; + this.reason = reason; + this.status = status; + this.type = type; + } + + @JsonProperty("lastTransitionTime") + public String getLastTransitionTime() { + return lastTransitionTime; + } + + @JsonProperty("lastTransitionTime") + public void setLastTransitionTime(String lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + } + + @JsonProperty("message") + public java.lang.String getMessage() { + return message; + } + + @JsonProperty("message") + public void setMessage(java.lang.String message) { + this.message = message; + } + + @JsonProperty("reason") + public java.lang.String getReason() { + return reason; + } + + @JsonProperty("reason") + public void setReason(java.lang.String reason) { + this.reason = reason; + } + + @JsonProperty("status") + public java.lang.String getStatus() { + return status; + } + + @JsonProperty("status") + public void setStatus(java.lang.String status) { + this.status = status; + } + + @JsonProperty("type") + public java.lang.String getType() { + return type; + } + + @JsonProperty("type") + public void setType(java.lang.String type) { + this.type = type; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscalerList.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscalerList.java new file mode 100644 index 00000000000..65486e7bdb3 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscalerList.java @@ -0,0 +1,180 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.KubernetesResourceList; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.ListMeta; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.fabric8.kubernetes.model.annotation.Group; +import io.fabric8.kubernetes.model.annotation.Version; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "items" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@Version("v2") +@Group("autoscaling") +public class HorizontalPodAutoscalerList implements KubernetesResource, KubernetesResourceList +{ + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + private String apiVersion = "autoscaling/v2"; + @JsonProperty("items") + private List items = new ArrayList(); + /** + * + * (Required) + * + */ + @JsonProperty("kind") + private String kind = "HorizontalPodAutoscalerList"; + @JsonProperty("metadata") + private ListMeta metadata; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public HorizontalPodAutoscalerList() { + } + + /** + * + * @param metadata + * @param apiVersion + * @param kind + * @param items + */ + public HorizontalPodAutoscalerList(String apiVersion, List items, String kind, ListMeta metadata) { + super(); + this.apiVersion = apiVersion; + this.items = items; + this.kind = kind; + this.metadata = metadata; + } + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + public String getApiVersion() { + return apiVersion; + } + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + @JsonProperty("items") + public List getItems() { + return items; + } + + @JsonProperty("items") + public void setItems(List items) { + this.items = items; + } + + /** + * + * (Required) + * + */ + @JsonProperty("kind") + public String getKind() { + return kind; + } + + /** + * + * (Required) + * + */ + @JsonProperty("kind") + public void setKind(String kind) { + this.kind = kind; + } + + @JsonProperty("metadata") + public ListMeta getMetadata() { + return metadata; + } + + @JsonProperty("metadata") + public void setMetadata(ListMeta metadata) { + this.metadata = metadata; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscalerSpec.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscalerSpec.java new file mode 100644 index 00000000000..bab9a02be99 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscalerSpec.java @@ -0,0 +1,163 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "behavior", + "maxReplicas", + "metrics", + "minReplicas", + "scaleTargetRef" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class HorizontalPodAutoscalerSpec implements KubernetesResource +{ + + @JsonProperty("behavior") + private HorizontalPodAutoscalerBehavior behavior; + @JsonProperty("maxReplicas") + private Integer maxReplicas; + @JsonProperty("metrics") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List metrics = new ArrayList(); + @JsonProperty("minReplicas") + private Integer minReplicas; + @JsonProperty("scaleTargetRef") + private CrossVersionObjectReference scaleTargetRef; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public HorizontalPodAutoscalerSpec() { + } + + /** + * + * @param maxReplicas + * @param minReplicas + * @param metrics + * @param behavior + * @param scaleTargetRef + */ + public HorizontalPodAutoscalerSpec(HorizontalPodAutoscalerBehavior behavior, Integer maxReplicas, List metrics, Integer minReplicas, CrossVersionObjectReference scaleTargetRef) { + super(); + this.behavior = behavior; + this.maxReplicas = maxReplicas; + this.metrics = metrics; + this.minReplicas = minReplicas; + this.scaleTargetRef = scaleTargetRef; + } + + @JsonProperty("behavior") + public HorizontalPodAutoscalerBehavior getBehavior() { + return behavior; + } + + @JsonProperty("behavior") + public void setBehavior(HorizontalPodAutoscalerBehavior behavior) { + this.behavior = behavior; + } + + @JsonProperty("maxReplicas") + public Integer getMaxReplicas() { + return maxReplicas; + } + + @JsonProperty("maxReplicas") + public void setMaxReplicas(Integer maxReplicas) { + this.maxReplicas = maxReplicas; + } + + @JsonProperty("metrics") + public List getMetrics() { + return metrics; + } + + @JsonProperty("metrics") + public void setMetrics(List metrics) { + this.metrics = metrics; + } + + @JsonProperty("minReplicas") + public Integer getMinReplicas() { + return minReplicas; + } + + @JsonProperty("minReplicas") + public void setMinReplicas(Integer minReplicas) { + this.minReplicas = minReplicas; + } + + @JsonProperty("scaleTargetRef") + public CrossVersionObjectReference getScaleTargetRef() { + return scaleTargetRef; + } + + @JsonProperty("scaleTargetRef") + public void setScaleTargetRef(CrossVersionObjectReference scaleTargetRef) { + this.scaleTargetRef = scaleTargetRef; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscalerStatus.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscalerStatus.java new file mode 100644 index 00000000000..63f7b16552e --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/HorizontalPodAutoscalerStatus.java @@ -0,0 +1,178 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "conditions", + "currentMetrics", + "currentReplicas", + "desiredReplicas", + "lastScaleTime", + "observedGeneration" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class HorizontalPodAutoscalerStatus implements KubernetesResource +{ + + @JsonProperty("conditions") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List conditions = new ArrayList(); + @JsonProperty("currentMetrics") + private List currentMetrics = new ArrayList(); + @JsonProperty("currentReplicas") + private Integer currentReplicas; + @JsonProperty("desiredReplicas") + private Integer desiredReplicas; + @JsonProperty("lastScaleTime") + private String lastScaleTime; + @JsonProperty("observedGeneration") + private Long observedGeneration; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public HorizontalPodAutoscalerStatus() { + } + + /** + * + * @param desiredReplicas + * @param currentReplicas + * @param conditions + * @param lastScaleTime + * @param observedGeneration + * @param currentMetrics + */ + public HorizontalPodAutoscalerStatus(List conditions, List currentMetrics, Integer currentReplicas, Integer desiredReplicas, String lastScaleTime, Long observedGeneration) { + super(); + this.conditions = conditions; + this.currentMetrics = currentMetrics; + this.currentReplicas = currentReplicas; + this.desiredReplicas = desiredReplicas; + this.lastScaleTime = lastScaleTime; + this.observedGeneration = observedGeneration; + } + + @JsonProperty("conditions") + public List getConditions() { + return conditions; + } + + @JsonProperty("conditions") + public void setConditions(List conditions) { + this.conditions = conditions; + } + + @JsonProperty("currentMetrics") + public List getCurrentMetrics() { + return currentMetrics; + } + + @JsonProperty("currentMetrics") + public void setCurrentMetrics(List currentMetrics) { + this.currentMetrics = currentMetrics; + } + + @JsonProperty("currentReplicas") + public Integer getCurrentReplicas() { + return currentReplicas; + } + + @JsonProperty("currentReplicas") + public void setCurrentReplicas(Integer currentReplicas) { + this.currentReplicas = currentReplicas; + } + + @JsonProperty("desiredReplicas") + public Integer getDesiredReplicas() { + return desiredReplicas; + } + + @JsonProperty("desiredReplicas") + public void setDesiredReplicas(Integer desiredReplicas) { + this.desiredReplicas = desiredReplicas; + } + + @JsonProperty("lastScaleTime") + public String getLastScaleTime() { + return lastScaleTime; + } + + @JsonProperty("lastScaleTime") + public void setLastScaleTime(String lastScaleTime) { + this.lastScaleTime = lastScaleTime; + } + + @JsonProperty("observedGeneration") + public Long getObservedGeneration() { + return observedGeneration; + } + + @JsonProperty("observedGeneration") + public void setObservedGeneration(Long observedGeneration) { + this.observedGeneration = observedGeneration; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(java.lang.String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/MetricIdentifier.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/MetricIdentifier.java new file mode 100644 index 00000000000..ad56dd97127 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/MetricIdentifier.java @@ -0,0 +1,114 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "name", + "selector" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(io.fabric8.kubernetes.api.model.LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class MetricIdentifier implements KubernetesResource +{ + + @JsonProperty("name") + private String name; + @JsonProperty("selector") + private io.fabric8.kubernetes.api.model.LabelSelector selector; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public MetricIdentifier() { + } + + /** + * + * @param name + * @param selector + */ + public MetricIdentifier(String name, io.fabric8.kubernetes.api.model.LabelSelector selector) { + super(); + this.name = name; + this.selector = selector; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + @JsonProperty("selector") + public io.fabric8.kubernetes.api.model.LabelSelector getSelector() { + return selector; + } + + @JsonProperty("selector") + public void setSelector(io.fabric8.kubernetes.api.model.LabelSelector selector) { + this.selector = selector; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/MetricSpec.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/MetricSpec.java new file mode 100644 index 00000000000..9c7aee1ea76 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/MetricSpec.java @@ -0,0 +1,175 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "containerResource", + "external", + "object", + "pods", + "resource", + "type" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class MetricSpec implements KubernetesResource +{ + + @JsonProperty("containerResource") + private ContainerResourceMetricSource containerResource; + @JsonProperty("external") + private ExternalMetricSource external; + @JsonProperty("object") + private ObjectMetricSource object; + @JsonProperty("pods") + private PodsMetricSource pods; + @JsonProperty("resource") + private ResourceMetricSource resource; + @JsonProperty("type") + private String type; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public MetricSpec() { + } + + /** + * + * @param external + * @param resource + * @param containerResource + * @param pods + * @param type + * @param object + */ + public MetricSpec(ContainerResourceMetricSource containerResource, ExternalMetricSource external, ObjectMetricSource object, PodsMetricSource pods, ResourceMetricSource resource, String type) { + super(); + this.containerResource = containerResource; + this.external = external; + this.object = object; + this.pods = pods; + this.resource = resource; + this.type = type; + } + + @JsonProperty("containerResource") + public ContainerResourceMetricSource getContainerResource() { + return containerResource; + } + + @JsonProperty("containerResource") + public void setContainerResource(ContainerResourceMetricSource containerResource) { + this.containerResource = containerResource; + } + + @JsonProperty("external") + public ExternalMetricSource getExternal() { + return external; + } + + @JsonProperty("external") + public void setExternal(ExternalMetricSource external) { + this.external = external; + } + + @JsonProperty("object") + public ObjectMetricSource getObject() { + return object; + } + + @JsonProperty("object") + public void setObject(ObjectMetricSource object) { + this.object = object; + } + + @JsonProperty("pods") + public PodsMetricSource getPods() { + return pods; + } + + @JsonProperty("pods") + public void setPods(PodsMetricSource pods) { + this.pods = pods; + } + + @JsonProperty("resource") + public ResourceMetricSource getResource() { + return resource; + } + + @JsonProperty("resource") + public void setResource(ResourceMetricSource resource) { + this.resource = resource; + } + + @JsonProperty("type") + public String getType() { + return type; + } + + @JsonProperty("type") + public void setType(String type) { + this.type = type; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/MetricStatus.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/MetricStatus.java new file mode 100644 index 00000000000..a3ad9ba34dd --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/MetricStatus.java @@ -0,0 +1,175 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "containerResource", + "external", + "object", + "pods", + "resource", + "type" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class MetricStatus implements KubernetesResource +{ + + @JsonProperty("containerResource") + private ContainerResourceMetricStatus containerResource; + @JsonProperty("external") + private ExternalMetricStatus external; + @JsonProperty("object") + private ObjectMetricStatus object; + @JsonProperty("pods") + private PodsMetricStatus pods; + @JsonProperty("resource") + private ResourceMetricStatus resource; + @JsonProperty("type") + private String type; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public MetricStatus() { + } + + /** + * + * @param external + * @param resource + * @param containerResource + * @param pods + * @param type + * @param object + */ + public MetricStatus(ContainerResourceMetricStatus containerResource, ExternalMetricStatus external, ObjectMetricStatus object, PodsMetricStatus pods, ResourceMetricStatus resource, String type) { + super(); + this.containerResource = containerResource; + this.external = external; + this.object = object; + this.pods = pods; + this.resource = resource; + this.type = type; + } + + @JsonProperty("containerResource") + public ContainerResourceMetricStatus getContainerResource() { + return containerResource; + } + + @JsonProperty("containerResource") + public void setContainerResource(ContainerResourceMetricStatus containerResource) { + this.containerResource = containerResource; + } + + @JsonProperty("external") + public ExternalMetricStatus getExternal() { + return external; + } + + @JsonProperty("external") + public void setExternal(ExternalMetricStatus external) { + this.external = external; + } + + @JsonProperty("object") + public ObjectMetricStatus getObject() { + return object; + } + + @JsonProperty("object") + public void setObject(ObjectMetricStatus object) { + this.object = object; + } + + @JsonProperty("pods") + public PodsMetricStatus getPods() { + return pods; + } + + @JsonProperty("pods") + public void setPods(PodsMetricStatus pods) { + this.pods = pods; + } + + @JsonProperty("resource") + public ResourceMetricStatus getResource() { + return resource; + } + + @JsonProperty("resource") + public void setResource(ResourceMetricStatus resource) { + this.resource = resource; + } + + @JsonProperty("type") + public String getType() { + return type; + } + + @JsonProperty("type") + public void setType(String type) { + this.type = type; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/MetricTarget.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/MetricTarget.java new file mode 100644 index 00000000000..aadf517b96c --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/MetricTarget.java @@ -0,0 +1,146 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.Quantity; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "averageUtilization", + "averageValue", + "type", + "value" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class MetricTarget implements KubernetesResource +{ + + @JsonProperty("averageUtilization") + private Integer averageUtilization; + @JsonProperty("averageValue") + private Quantity averageValue; + @JsonProperty("type") + private String type; + @JsonProperty("value") + private Quantity value; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public MetricTarget() { + } + + /** + * + * @param averageValue + * @param averageUtilization + * @param type + * @param value + */ + public MetricTarget(Integer averageUtilization, Quantity averageValue, String type, Quantity value) { + super(); + this.averageUtilization = averageUtilization; + this.averageValue = averageValue; + this.type = type; + this.value = value; + } + + @JsonProperty("averageUtilization") + public Integer getAverageUtilization() { + return averageUtilization; + } + + @JsonProperty("averageUtilization") + public void setAverageUtilization(Integer averageUtilization) { + this.averageUtilization = averageUtilization; + } + + @JsonProperty("averageValue") + public Quantity getAverageValue() { + return averageValue; + } + + @JsonProperty("averageValue") + public void setAverageValue(Quantity averageValue) { + this.averageValue = averageValue; + } + + @JsonProperty("type") + public String getType() { + return type; + } + + @JsonProperty("type") + public void setType(String type) { + this.type = type; + } + + @JsonProperty("value") + public Quantity getValue() { + return value; + } + + @JsonProperty("value") + public void setValue(Quantity value) { + this.value = value; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/MetricValueStatus.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/MetricValueStatus.java new file mode 100644 index 00000000000..d2d6911ab20 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/MetricValueStatus.java @@ -0,0 +1,131 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.Quantity; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "averageUtilization", + "averageValue", + "value" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class MetricValueStatus implements KubernetesResource +{ + + @JsonProperty("averageUtilization") + private Integer averageUtilization; + @JsonProperty("averageValue") + private Quantity averageValue; + @JsonProperty("value") + private Quantity value; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public MetricValueStatus() { + } + + /** + * + * @param averageValue + * @param averageUtilization + * @param value + */ + public MetricValueStatus(Integer averageUtilization, Quantity averageValue, Quantity value) { + super(); + this.averageUtilization = averageUtilization; + this.averageValue = averageValue; + this.value = value; + } + + @JsonProperty("averageUtilization") + public Integer getAverageUtilization() { + return averageUtilization; + } + + @JsonProperty("averageUtilization") + public void setAverageUtilization(Integer averageUtilization) { + this.averageUtilization = averageUtilization; + } + + @JsonProperty("averageValue") + public Quantity getAverageValue() { + return averageValue; + } + + @JsonProperty("averageValue") + public void setAverageValue(Quantity averageValue) { + this.averageValue = averageValue; + } + + @JsonProperty("value") + public Quantity getValue() { + return value; + } + + @JsonProperty("value") + public void setValue(Quantity value) { + this.value = value; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ObjectMetricSource.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ObjectMetricSource.java new file mode 100644 index 00000000000..7e4bc552722 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ObjectMetricSource.java @@ -0,0 +1,130 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "describedObject", + "metric", + "target" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class ObjectMetricSource implements KubernetesResource +{ + + @JsonProperty("describedObject") + private CrossVersionObjectReference describedObject; + @JsonProperty("metric") + private MetricIdentifier metric; + @JsonProperty("target") + private MetricTarget target; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public ObjectMetricSource() { + } + + /** + * + * @param describedObject + * @param metric + * @param target + */ + public ObjectMetricSource(CrossVersionObjectReference describedObject, MetricIdentifier metric, MetricTarget target) { + super(); + this.describedObject = describedObject; + this.metric = metric; + this.target = target; + } + + @JsonProperty("describedObject") + public CrossVersionObjectReference getDescribedObject() { + return describedObject; + } + + @JsonProperty("describedObject") + public void setDescribedObject(CrossVersionObjectReference describedObject) { + this.describedObject = describedObject; + } + + @JsonProperty("metric") + public MetricIdentifier getMetric() { + return metric; + } + + @JsonProperty("metric") + public void setMetric(MetricIdentifier metric) { + this.metric = metric; + } + + @JsonProperty("target") + public MetricTarget getTarget() { + return target; + } + + @JsonProperty("target") + public void setTarget(MetricTarget target) { + this.target = target; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ObjectMetricStatus.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ObjectMetricStatus.java new file mode 100644 index 00000000000..7de937dd0d1 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ObjectMetricStatus.java @@ -0,0 +1,130 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "current", + "describedObject", + "metric" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class ObjectMetricStatus implements KubernetesResource +{ + + @JsonProperty("current") + private MetricValueStatus current; + @JsonProperty("describedObject") + private CrossVersionObjectReference describedObject; + @JsonProperty("metric") + private MetricIdentifier metric; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public ObjectMetricStatus() { + } + + /** + * + * @param describedObject + * @param current + * @param metric + */ + public ObjectMetricStatus(MetricValueStatus current, CrossVersionObjectReference describedObject, MetricIdentifier metric) { + super(); + this.current = current; + this.describedObject = describedObject; + this.metric = metric; + } + + @JsonProperty("current") + public MetricValueStatus getCurrent() { + return current; + } + + @JsonProperty("current") + public void setCurrent(MetricValueStatus current) { + this.current = current; + } + + @JsonProperty("describedObject") + public CrossVersionObjectReference getDescribedObject() { + return describedObject; + } + + @JsonProperty("describedObject") + public void setDescribedObject(CrossVersionObjectReference describedObject) { + this.describedObject = describedObject; + } + + @JsonProperty("metric") + public MetricIdentifier getMetric() { + return metric; + } + + @JsonProperty("metric") + public void setMetric(MetricIdentifier metric) { + this.metric = metric; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/PodsMetricSource.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/PodsMetricSource.java new file mode 100644 index 00000000000..37a1122b661 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/PodsMetricSource.java @@ -0,0 +1,115 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "metric", + "target" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class PodsMetricSource implements KubernetesResource +{ + + @JsonProperty("metric") + private MetricIdentifier metric; + @JsonProperty("target") + private MetricTarget target; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public PodsMetricSource() { + } + + /** + * + * @param metric + * @param target + */ + public PodsMetricSource(MetricIdentifier metric, MetricTarget target) { + super(); + this.metric = metric; + this.target = target; + } + + @JsonProperty("metric") + public MetricIdentifier getMetric() { + return metric; + } + + @JsonProperty("metric") + public void setMetric(MetricIdentifier metric) { + this.metric = metric; + } + + @JsonProperty("target") + public MetricTarget getTarget() { + return target; + } + + @JsonProperty("target") + public void setTarget(MetricTarget target) { + this.target = target; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/PodsMetricStatus.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/PodsMetricStatus.java new file mode 100644 index 00000000000..bbdd0e0bee9 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/PodsMetricStatus.java @@ -0,0 +1,115 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "current", + "metric" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class PodsMetricStatus implements KubernetesResource +{ + + @JsonProperty("current") + private MetricValueStatus current; + @JsonProperty("metric") + private MetricIdentifier metric; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public PodsMetricStatus() { + } + + /** + * + * @param current + * @param metric + */ + public PodsMetricStatus(MetricValueStatus current, MetricIdentifier metric) { + super(); + this.current = current; + this.metric = metric; + } + + @JsonProperty("current") + public MetricValueStatus getCurrent() { + return current; + } + + @JsonProperty("current") + public void setCurrent(MetricValueStatus current) { + this.current = current; + } + + @JsonProperty("metric") + public MetricIdentifier getMetric() { + return metric; + } + + @JsonProperty("metric") + public void setMetric(MetricIdentifier metric) { + this.metric = metric; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ResourceMetricSource.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ResourceMetricSource.java new file mode 100644 index 00000000000..da9a56d38c7 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ResourceMetricSource.java @@ -0,0 +1,115 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "name", + "target" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class ResourceMetricSource implements KubernetesResource +{ + + @JsonProperty("name") + private String name; + @JsonProperty("target") + private MetricTarget target; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public ResourceMetricSource() { + } + + /** + * + * @param name + * @param target + */ + public ResourceMetricSource(String name, MetricTarget target) { + super(); + this.name = name; + this.target = target; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + @JsonProperty("target") + public MetricTarget getTarget() { + return target; + } + + @JsonProperty("target") + public void setTarget(MetricTarget target) { + this.target = target; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ResourceMetricStatus.java b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ResourceMetricStatus.java new file mode 100644 index 00000000000..d2a82e5ef0f --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/generated/java/io/fabric8/kubernetes/api/model/autoscaling/v2/ResourceMetricStatus.java @@ -0,0 +1,115 @@ + +package io.fabric8.kubernetes.api.model.autoscaling.v2; + +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "current", + "name" +}) +@ToString +@EqualsAndHashCode +@Setter +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +public class ResourceMetricStatus implements KubernetesResource +{ + + @JsonProperty("current") + private MetricValueStatus current; + @JsonProperty("name") + private String name; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * No args constructor for use in serialization + * + */ + public ResourceMetricStatus() { + } + + /** + * + * @param current + * @param name + */ + public ResourceMetricStatus(MetricValueStatus current, String name) { + super(); + this.current = current; + this.name = name; + } + + @JsonProperty("current") + public MetricValueStatus getCurrent() { + return current; + } + + @JsonProperty("current") + public void setCurrent(MetricValueStatus current) { + this.current = current; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/main/resources/schema/kube-schema.json b/kubernetes-model-generator/kubernetes-model-autoscaling/src/main/resources/schema/kube-schema.json index b3cd2f270a7..93eb79d4a12 100644 --- a/kubernetes-model-generator/kubernetes-model-autoscaling/src/main/resources/schema/kube-schema.json +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/main/resources/schema/kube-schema.json @@ -987,6 +987,566 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, + "kubernetes_autoscaling_v2_ContainerResourceMetricSource": { + "type": "object", + "properties": { + "container": { + "type": "string" + }, + "name": { + "type": "string" + }, + "target": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricTarget", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricTarget" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ContainerResourceMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_ContainerResourceMetricStatus": { + "type": "object", + "properties": { + "container": { + "type": "string" + }, + "current": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricValueStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricValueStatus" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ContainerResourceMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_CrossVersionObjectReference": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.CrossVersionObjectReference", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_ExternalMetricSource": { + "type": "object", + "properties": { + "metric": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricIdentifier", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricIdentifier" + }, + "target": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricTarget", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricTarget" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ExternalMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_ExternalMetricStatus": { + "type": "object", + "properties": { + "current": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricValueStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricValueStatus" + }, + "metric": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricIdentifier", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricIdentifier" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ExternalMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_HPAScalingPolicy": { + "type": "object", + "properties": { + "periodSeconds": { + "type": "integer" + }, + "type": { + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HPAScalingPolicy", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_HPAScalingRules": { + "type": "object", + "properties": { + "policies": { + "type": "array", + "javaOmitEmpty": true, + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HPAScalingPolicy", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HPAScalingPolicy" + } + }, + "selectPolicy": { + "type": "string" + }, + "stabilizationWindowSeconds": { + "type": "integer" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HPAScalingRules", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_HorizontalPodAutoscaler": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "autoscaling/v2", + "required": true + }, + "kind": { + "type": "string", + "default": "HorizontalPodAutoscaler", + "required": true + }, + "metadata": { + "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", + "existingJavaType": "io.fabric8.kubernetes.api.model.ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HorizontalPodAutoscalerSpec", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerSpec" + }, + "status": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HorizontalPodAutoscalerStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerStatus" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscaler", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.HasMetadata", + "io.fabric8.kubernetes.api.model.Namespaced" + ] + }, + "kubernetes_autoscaling_v2_HorizontalPodAutoscalerBehavior": { + "type": "object", + "properties": { + "scaleDown": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HPAScalingRules", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HPAScalingRules" + }, + "scaleUp": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HPAScalingRules", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HPAScalingRules" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerBehavior", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_HorizontalPodAutoscalerCondition": { + "type": "object", + "properties": { + "lastTransitionTime": { + "$ref": "#/definitions/kubernetes_apimachinery_Time", + "existingJavaType": "String" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerCondition", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_HorizontalPodAutoscalerList": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "autoscaling/v2", + "required": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HorizontalPodAutoscaler", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscaler" + } + }, + "kind": { + "type": "string", + "default": "HorizontalPodAutoscalerList", + "required": true + }, + "metadata": { + "$ref": "#/definitions/kubernetes_apimachinery_ListMeta", + "existingJavaType": "io.fabric8.kubernetes.api.model.ListMeta" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerList", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource", + "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscaler\u003e" + ] + }, + "kubernetes_autoscaling_v2_HorizontalPodAutoscalerSpec": { + "type": "object", + "properties": { + "behavior": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HorizontalPodAutoscalerBehavior", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerBehavior" + }, + "maxReplicas": { + "type": "integer" + }, + "metrics": { + "type": "array", + "javaOmitEmpty": true, + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricSpec", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricSpec" + } + }, + "minReplicas": { + "type": "integer" + }, + "scaleTargetRef": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_CrossVersionObjectReference", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.CrossVersionObjectReference" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerSpec", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_HorizontalPodAutoscalerStatus": { + "type": "object", + "properties": { + "conditions": { + "type": "array", + "javaOmitEmpty": true, + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HorizontalPodAutoscalerCondition", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerCondition" + } + }, + "currentMetrics": { + "type": "array", + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricStatus" + } + }, + "currentReplicas": { + "type": "integer" + }, + "desiredReplicas": { + "type": "integer" + }, + "lastScaleTime": { + "$ref": "#/definitions/kubernetes_apimachinery_Time", + "existingJavaType": "String" + }, + "observedGeneration": { + "type": "integer", + "existingJavaType": "Long" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_MetricIdentifier": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "selector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "existingJavaType": "io.fabric8.kubernetes.api.model.LabelSelector" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricIdentifier", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_MetricSpec": { + "type": "object", + "properties": { + "containerResource": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_ContainerResourceMetricSource", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ContainerResourceMetricSource" + }, + "external": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_ExternalMetricSource", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ExternalMetricSource" + }, + "object": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_ObjectMetricSource", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ObjectMetricSource" + }, + "pods": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_PodsMetricSource", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.PodsMetricSource" + }, + "resource": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_ResourceMetricSource", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ResourceMetricSource" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricSpec", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_MetricStatus": { + "type": "object", + "properties": { + "containerResource": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_ContainerResourceMetricStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ContainerResourceMetricStatus" + }, + "external": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_ExternalMetricStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ExternalMetricStatus" + }, + "object": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_ObjectMetricStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ObjectMetricStatus" + }, + "pods": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_PodsMetricStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.PodsMetricStatus" + }, + "resource": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_ResourceMetricStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ResourceMetricStatus" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_MetricTarget": { + "type": "object", + "properties": { + "averageUtilization": { + "type": "integer" + }, + "averageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "type": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricTarget", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_MetricValueStatus": { + "type": "object", + "properties": { + "averageUtilization": { + "type": "integer" + }, + "averageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "value": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricValueStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_ObjectMetricSource": { + "type": "object", + "properties": { + "describedObject": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_CrossVersionObjectReference", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.CrossVersionObjectReference" + }, + "metric": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricIdentifier", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricIdentifier" + }, + "target": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricTarget", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricTarget" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ObjectMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_ObjectMetricStatus": { + "type": "object", + "properties": { + "current": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricValueStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricValueStatus" + }, + "describedObject": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_CrossVersionObjectReference", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.CrossVersionObjectReference" + }, + "metric": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricIdentifier", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricIdentifier" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ObjectMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_PodsMetricSource": { + "type": "object", + "properties": { + "metric": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricIdentifier", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricIdentifier" + }, + "target": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricTarget", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricTarget" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.PodsMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_PodsMetricStatus": { + "type": "object", + "properties": { + "current": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricValueStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricValueStatus" + }, + "metric": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricIdentifier", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricIdentifier" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.PodsMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_ResourceMetricSource": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "target": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricTarget", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricTarget" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ResourceMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_ResourceMetricStatus": { + "type": "object", + "properties": { + "current": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricValueStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricValueStatus" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ResourceMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, "kubernetes_autoscaling_v2beta1_ContainerResourceMetricSource": { "type": "object", "properties": { @@ -2120,6 +2680,14 @@ "$ref": "#/definitions/kubernetes_autoscaling_v1_HorizontalPodAutoscalerList", "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerList" }, + "V2HorizontalPodAutoscaler": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HorizontalPodAutoscaler", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscaler" + }, + "V2HorizontalPodAutoscalerList": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HorizontalPodAutoscalerList", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerList" + }, "V2beta1HorizontalPodAutoscaler": { "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_HorizontalPodAutoscaler", "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler" diff --git a/kubernetes-model-generator/kubernetes-model-autoscaling/src/main/resources/schema/validation-schema.json b/kubernetes-model-generator/kubernetes-model-autoscaling/src/main/resources/schema/validation-schema.json index 4c31ca5b4b3..fbf31c99f18 100644 --- a/kubernetes-model-generator/kubernetes-model-autoscaling/src/main/resources/schema/validation-schema.json +++ b/kubernetes-model-generator/kubernetes-model-autoscaling/src/main/resources/schema/validation-schema.json @@ -987,6 +987,566 @@ "io.fabric8.kubernetes.api.model.KubernetesResource" ] }, + "kubernetes_autoscaling_v2_ContainerResourceMetricSource": { + "type": "object", + "properties": { + "container": { + "type": "string" + }, + "name": { + "type": "string" + }, + "target": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricTarget", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricTarget" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ContainerResourceMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_ContainerResourceMetricStatus": { + "type": "object", + "properties": { + "container": { + "type": "string" + }, + "current": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricValueStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricValueStatus" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ContainerResourceMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_CrossVersionObjectReference": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.CrossVersionObjectReference", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_ExternalMetricSource": { + "type": "object", + "properties": { + "metric": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricIdentifier", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricIdentifier" + }, + "target": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricTarget", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricTarget" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ExternalMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_ExternalMetricStatus": { + "type": "object", + "properties": { + "current": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricValueStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricValueStatus" + }, + "metric": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricIdentifier", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricIdentifier" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ExternalMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_HPAScalingPolicy": { + "type": "object", + "properties": { + "periodSeconds": { + "type": "integer" + }, + "type": { + "type": "string" + }, + "value": { + "type": "integer" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HPAScalingPolicy", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_HPAScalingRules": { + "type": "object", + "properties": { + "policies": { + "type": "array", + "javaOmitEmpty": true, + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HPAScalingPolicy", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HPAScalingPolicy" + } + }, + "selectPolicy": { + "type": "string" + }, + "stabilizationWindowSeconds": { + "type": "integer" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HPAScalingRules", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_HorizontalPodAutoscaler": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "autoscaling/v2", + "required": true + }, + "kind": { + "type": "string", + "default": "HorizontalPodAutoscaler", + "required": true + }, + "metadata": { + "$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta", + "existingJavaType": "io.fabric8.kubernetes.api.model.ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HorizontalPodAutoscalerSpec", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerSpec" + }, + "status": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HorizontalPodAutoscalerStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerStatus" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscaler", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.HasMetadata", + "io.fabric8.kubernetes.api.model.Namespaced" + ] + }, + "kubernetes_autoscaling_v2_HorizontalPodAutoscalerBehavior": { + "type": "object", + "properties": { + "scaleDown": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HPAScalingRules", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HPAScalingRules" + }, + "scaleUp": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HPAScalingRules", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HPAScalingRules" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerBehavior", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_HorizontalPodAutoscalerCondition": { + "type": "object", + "properties": { + "lastTransitionTime": { + "$ref": "#/definitions/kubernetes_apimachinery_Time", + "existingJavaType": "String" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerCondition", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_HorizontalPodAutoscalerList": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "autoscaling/v2", + "required": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HorizontalPodAutoscaler", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscaler" + } + }, + "kind": { + "type": "string", + "default": "HorizontalPodAutoscalerList", + "required": true + }, + "metadata": { + "$ref": "#/definitions/kubernetes_apimachinery_ListMeta", + "existingJavaType": "io.fabric8.kubernetes.api.model.ListMeta" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerList", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource", + "io.fabric8.kubernetes.api.model.KubernetesResourceList\u003cio.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscaler\u003e" + ] + }, + "kubernetes_autoscaling_v2_HorizontalPodAutoscalerSpec": { + "type": "object", + "properties": { + "behavior": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HorizontalPodAutoscalerBehavior", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerBehavior" + }, + "maxReplicas": { + "type": "integer" + }, + "metrics": { + "type": "array", + "javaOmitEmpty": true, + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricSpec", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricSpec" + } + }, + "minReplicas": { + "type": "integer" + }, + "scaleTargetRef": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_CrossVersionObjectReference", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.CrossVersionObjectReference" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerSpec", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_HorizontalPodAutoscalerStatus": { + "type": "object", + "properties": { + "conditions": { + "type": "array", + "javaOmitEmpty": true, + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HorizontalPodAutoscalerCondition", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerCondition" + } + }, + "currentMetrics": { + "type": "array", + "items": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricStatus" + } + }, + "currentReplicas": { + "type": "integer" + }, + "desiredReplicas": { + "type": "integer" + }, + "lastScaleTime": { + "$ref": "#/definitions/kubernetes_apimachinery_Time", + "existingJavaType": "String" + }, + "observedGeneration": { + "type": "integer", + "existingJavaType": "Long" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_MetricIdentifier": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "selector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "existingJavaType": "io.fabric8.kubernetes.api.model.LabelSelector" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricIdentifier", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_MetricSpec": { + "type": "object", + "properties": { + "containerResource": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_ContainerResourceMetricSource", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ContainerResourceMetricSource" + }, + "external": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_ExternalMetricSource", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ExternalMetricSource" + }, + "object": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_ObjectMetricSource", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ObjectMetricSource" + }, + "pods": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_PodsMetricSource", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.PodsMetricSource" + }, + "resource": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_ResourceMetricSource", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ResourceMetricSource" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricSpec", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_MetricStatus": { + "type": "object", + "properties": { + "containerResource": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_ContainerResourceMetricStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ContainerResourceMetricStatus" + }, + "external": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_ExternalMetricStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ExternalMetricStatus" + }, + "object": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_ObjectMetricStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ObjectMetricStatus" + }, + "pods": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_PodsMetricStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.PodsMetricStatus" + }, + "resource": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_ResourceMetricStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ResourceMetricStatus" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_MetricTarget": { + "type": "object", + "properties": { + "averageUtilization": { + "type": "integer" + }, + "averageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "type": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricTarget", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_MetricValueStatus": { + "type": "object", + "properties": { + "averageUtilization": { + "type": "integer" + }, + "averageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "value": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricValueStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_ObjectMetricSource": { + "type": "object", + "properties": { + "describedObject": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_CrossVersionObjectReference", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.CrossVersionObjectReference" + }, + "metric": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricIdentifier", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricIdentifier" + }, + "target": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricTarget", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricTarget" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ObjectMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_ObjectMetricStatus": { + "type": "object", + "properties": { + "current": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricValueStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricValueStatus" + }, + "describedObject": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_CrossVersionObjectReference", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.CrossVersionObjectReference" + }, + "metric": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricIdentifier", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricIdentifier" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ObjectMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_PodsMetricSource": { + "type": "object", + "properties": { + "metric": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricIdentifier", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricIdentifier" + }, + "target": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricTarget", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricTarget" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.PodsMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_PodsMetricStatus": { + "type": "object", + "properties": { + "current": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricValueStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricValueStatus" + }, + "metric": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricIdentifier", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricIdentifier" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.PodsMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_ResourceMetricSource": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "target": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricTarget", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricTarget" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ResourceMetricSource", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, + "kubernetes_autoscaling_v2_ResourceMetricStatus": { + "type": "object", + "properties": { + "current": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricValueStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricValueStatus" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": true, + "javaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ResourceMetricStatus", + "javaInterfaces": [ + "io.fabric8.kubernetes.api.model.KubernetesResource" + ] + }, "kubernetes_autoscaling_v2beta1_ContainerResourceMetricSource": { "type": "object", "properties": { @@ -2120,6 +2680,14 @@ "$ref": "#/definitions/kubernetes_autoscaling_v1_HorizontalPodAutoscalerList", "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerList" }, + "V2HorizontalPodAutoscaler": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HorizontalPodAutoscaler", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscaler" + }, + "V2HorizontalPodAutoscalerList": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_HorizontalPodAutoscalerList", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerList" + }, "V2beta1HorizontalPodAutoscaler": { "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_HorizontalPodAutoscaler", "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscaler" @@ -2206,12 +2774,9 @@ "name": { "type": "string" }, - "targetAverageUtilization": { - "type": "integer" - }, - "targetAverageValue": { - "$ref": "#/definitions/kubernetes_resource_Quantity", - "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" + "target": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricTarget", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricTarget" } }, "additionalProperties": true @@ -2222,8 +2787,8 @@ "type": "string" }, "current": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricValueStatus", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricValueStatus" + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricValueStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricValueStatus" }, "name": { "type": "string" @@ -2311,33 +2876,33 @@ }, "externalmetricsource": { "properties": { - "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" + "metricName": { + "type": "string" }, - "target": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricTarget", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricTarget" + "metricSelector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "existingJavaType": "io.fabric8.kubernetes.api.model.LabelSelector" + }, + "targetAverageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" + }, + "targetValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" } }, "additionalProperties": true }, "externalmetricstatus": { "properties": { - "currentAverageValue": { - "$ref": "#/definitions/kubernetes_resource_Quantity", - "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" - }, - "currentValue": { - "$ref": "#/definitions/kubernetes_resource_Quantity", - "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" - }, - "metricName": { - "type": "string" + "current": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricValueStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricValueStatus" }, - "metricSelector": { - "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", - "existingJavaType": "io.fabric8.kubernetes.api.model.LabelSelector" + "metric": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" } }, "additionalProperties": true @@ -2378,7 +2943,7 @@ "properties": { "apiVersion": { "type": "string", - "default": "autoscaling/v2beta2", + "default": "autoscaling/v1", "required": true }, "kind": { @@ -2391,12 +2956,12 @@ "existingJavaType": "io.fabric8.kubernetes.api.model.ObjectMeta" }, "spec": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerSpec", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerSpec" + "$ref": "#/definitions/kubernetes_autoscaling_v1_HorizontalPodAutoscalerSpec", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerSpec" }, "status": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerStatus", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerStatus" + "$ref": "#/definitions/kubernetes_autoscaling_v1_HorizontalPodAutoscalerStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerStatus" } }, "additionalProperties": true @@ -2404,12 +2969,12 @@ "horizontalpodautoscalerbehavior": { "properties": { "scaleDown": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HPAScalingRules", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HPAScalingRules" + "$ref": "#/definitions/kubernetes_autoscaling_v2_HPAScalingRules", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HPAScalingRules" }, "scaleUp": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HPAScalingRules", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HPAScalingRules" + "$ref": "#/definitions/kubernetes_autoscaling_v2_HPAScalingRules", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HPAScalingRules" } }, "additionalProperties": true @@ -2439,14 +3004,14 @@ "properties": { "apiVersion": { "type": "string", - "default": "autoscaling/v2beta2", + "default": "autoscaling/v2", "required": true }, "items": { "type": "array", "items": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscaler", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscaler" + "$ref": "#/definitions/kubernetes_autoscaling_v2_HorizontalPodAutoscaler", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscaler" } }, "kind": { @@ -2466,20 +3031,15 @@ "maxReplicas": { "type": "integer" }, - "metrics": { - "type": "array", - "javaOmitEmpty": true, - "items": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_MetricSpec", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.MetricSpec" - } - }, "minReplicas": { "type": "integer" }, "scaleTargetRef": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_CrossVersionObjectReference", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.CrossVersionObjectReference" + "$ref": "#/definitions/kubernetes_autoscaling_v1_CrossVersionObjectReference", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v1.CrossVersionObjectReference" + }, + "targetCPUUtilizationPercentage": { + "type": "integer" } }, "additionalProperties": true @@ -2488,16 +3048,17 @@ "properties": { "conditions": { "type": "array", + "javaOmitEmpty": true, "items": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_HorizontalPodAutoscalerCondition", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.HorizontalPodAutoscalerCondition" + "$ref": "#/definitions/kubernetes_autoscaling_v2_HorizontalPodAutoscalerCondition", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.HorizontalPodAutoscalerCondition" } }, "currentMetrics": { "type": "array", "items": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricStatus", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricStatus" + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricStatus" } }, "currentReplicas": { @@ -2754,24 +3315,24 @@ "metricspec": { "properties": { "containerResource": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ContainerResourceMetricSource", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ContainerResourceMetricSource" + "$ref": "#/definitions/kubernetes_autoscaling_v2_ContainerResourceMetricSource", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ContainerResourceMetricSource" }, "external": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ExternalMetricSource", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ExternalMetricSource" + "$ref": "#/definitions/kubernetes_autoscaling_v2_ExternalMetricSource", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ExternalMetricSource" }, "object": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ObjectMetricSource", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ObjectMetricSource" + "$ref": "#/definitions/kubernetes_autoscaling_v2_ObjectMetricSource", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ObjectMetricSource" }, "pods": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_PodsMetricSource", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.PodsMetricSource" + "$ref": "#/definitions/kubernetes_autoscaling_v2_PodsMetricSource", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.PodsMetricSource" }, "resource": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_ResourceMetricSource", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.ResourceMetricSource" + "$ref": "#/definitions/kubernetes_autoscaling_v2_ResourceMetricSource", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.ResourceMetricSource" }, "type": { "type": "string" @@ -2925,24 +3486,17 @@ }, "objectmetricsource": { "properties": { - "averageValue": { - "$ref": "#/definitions/kubernetes_resource_Quantity", - "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" - }, - "metricName": { - "type": "string" + "describedObject": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_CrossVersionObjectReference", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.CrossVersionObjectReference" }, - "selector": { - "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", - "existingJavaType": "io.fabric8.kubernetes.api.model.LabelSelector" + "metric": { + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricIdentifier", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricIdentifier" }, "target": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta1_CrossVersionObjectReference", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta1.CrossVersionObjectReference" - }, - "targetValue": { - "$ref": "#/definitions/kubernetes_resource_Quantity", - "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" + "$ref": "#/definitions/kubernetes_autoscaling_v2_MetricTarget", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2.MetricTarget" } }, "additionalProperties": true @@ -3023,29 +3577,29 @@ }, "podsmetricsource": { "properties": { - "metric": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" + "metricName": { + "type": "string" }, - "target": { - "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricTarget", - "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricTarget" + "selector": { + "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", + "existingJavaType": "io.fabric8.kubernetes.api.model.LabelSelector" + }, + "targetAverageValue": { + "$ref": "#/definitions/kubernetes_resource_Quantity", + "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" } }, "additionalProperties": true }, "podsmetricstatus": { "properties": { - "currentAverageValue": { - "$ref": "#/definitions/kubernetes_resource_Quantity", - "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" - }, - "metricName": { - "type": "string" + "current": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricValueStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricValueStatus" }, - "selector": { - "$ref": "#/definitions/kubernetes_apimachinery_LabelSelector", - "existingJavaType": "io.fabric8.kubernetes.api.model.LabelSelector" + "metric": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricIdentifier", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricIdentifier" } }, "additionalProperties": true @@ -3086,12 +3640,9 @@ }, "resourcemetricstatus": { "properties": { - "currentAverageUtilization": { - "type": "integer" - }, - "currentAverageValue": { - "$ref": "#/definitions/kubernetes_resource_Quantity", - "existingJavaType": "io.fabric8.kubernetes.api.model.Quantity" + "current": { + "$ref": "#/definitions/kubernetes_autoscaling_v2beta2_MetricValueStatus", + "existingJavaType": "io.fabric8.kubernetes.api.model.autoscaling.v2beta2.MetricValueStatus" }, "name": { "type": "string" diff --git a/kubernetes-model-generator/kubernetes-model-core/pom.xml b/kubernetes-model-generator/kubernetes-model-core/pom.xml index e30cd85be47..e99f06c40b1 100644 --- a/kubernetes-model-generator/kubernetes-model-core/pom.xml +++ b/kubernetes-model-generator/kubernetes-model-core/pom.xml @@ -89,6 +89,7 @@ io.fabric8.kubernetes.api.model.autoscaling.v1, io.fabric8.kubernetes.api.model.autoscaling.v2beta1, io.fabric8.kubernetes.api.model.autoscaling.v2beta2, + io.fabric8.kubernetes.api.model.autoscaling.v2, io.fabric8.kubernetes.api.model.batch.v1, io.fabric8.kubernetes.api.model.batch.v1beta1, io.fabric8.kubernetes.api.model.certificates.v1, diff --git a/pom.xml b/pom.xml index 985b8b4729e..8bebdcaf82d 100644 --- a/pom.xml +++ b/pom.xml @@ -1306,5 +1306,21 @@ + + blazar-sources + + + env.BLAZAR_COORDINATES + + + + + + org.apache.maven.plugins + maven-source-plugin + + + +