From 6638011fe251d564be1d47c4d3a0e6766cbdf277 Mon Sep 17 00:00:00 2001 From: tunahanertekin Date: Wed, 8 Nov 2023 10:56:22 +0000 Subject: [PATCH] build(ci): generate fabric8 models 0.1.0-alpha.10 for robot.roboscale.io v0.2.6-alpha.13, fleet.roboscale.io v0.1.6-alpha.14 and connection-hub.roboscale.io v0.1.7-alpha.10 --- .../robot.roboscale.io_metricsexporters.yaml | 37 ++++++++++ crds/base/robot.roboscale.io_robots.yaml | 12 +++ pom.xml | 2 +- .../robot/v1alpha1/MetricsExporterSpec.java | 18 ++++- .../roboscale/robot/v1alpha1/RobotStatus.java | 18 ++++- .../v1alpha1/metricsexporterspec/Storage.java | 41 +++++++++++ .../v1alpha1/metricsexporterstatus/Usage.java | 18 ++++- .../usage/GpuInstanceUsage.java | 2 +- .../metricsexporterstatus/usage/Storage.java | 41 +++++++++++ .../usage/storage/Usage.java | 73 +++++++++++++++++++ .../robot/v1alpha1/robotstatus/HostDirs.java | 45 ++++++++++++ 11 files changed, 302 insertions(+), 5 deletions(-) create mode 100644 src/main/java/io/roboscale/robot/v1alpha1/metricsexporterspec/Storage.java create mode 100644 src/main/java/io/roboscale/robot/v1alpha1/metricsexporterstatus/usage/Storage.java create mode 100644 src/main/java/io/roboscale/robot/v1alpha1/metricsexporterstatus/usage/storage/Usage.java create mode 100644 src/main/java/io/roboscale/robot/v1alpha1/robotstatus/HostDirs.java diff --git a/crds/base/robot.roboscale.io_metricsexporters.yaml b/crds/base/robot.roboscale.io_metricsexporters.yaml index 18884f8e..e73e57cc 100644 --- a/crds/base/robot.roboscale.io_metricsexporters.yaml +++ b/crds/base/robot.roboscale.io_metricsexporters.yaml @@ -63,6 +63,17 @@ spec: machine if it's set to `true`. type: boolean type: object + storage: + description: Configurational parameters about storage metrics collection. + properties: + interval: + description: Watching latency. + type: integer + track: + description: MetricsExporter watches storage usage in the host + machine if it's set to `true`. + type: boolean + type: object type: object status: description: Most recently observed status of the MetricsExporter. @@ -288,6 +299,7 @@ spec: (eg. mig-1g.10gb). properties: allocated: + default: "0" description: Number of allocated virtual cores. type: string capacity: @@ -318,6 +330,31 @@ spec: description: Loads values of network interfaces. type: object type: object + storage: + description: Storage usage information + properties: + lastUpdateTimestamp: + description: Last update time. + type: string + usage: + additionalProperties: + properties: + mountedOn: + description: Directory that the filesystem mounted on. + type: string + percentage: + description: Usage percentage of a filesystem. + type: string + size: + description: Size of the filesystem. + type: string + used: + description: Size of the used parts of a filesystem. + type: string + type: object + description: Usage values of filesystems. + type: object + type: object type: object type: object type: object diff --git a/crds/base/robot.roboscale.io_robots.yaml b/crds/base/robot.roboscale.io_robots.yaml index cb1d44d3..f8713429 100644 --- a/crds/base/robot.roboscale.io_robots.yaml +++ b/crds/base/robot.roboscale.io_robots.yaml @@ -1765,6 +1765,18 @@ spec: type: object type: object type: object + hostDirs: + description: '[*alpha*] List of directories mounted from host.' + items: + properties: + hostPath: + type: string + internalPath: + type: string + name: + type: string + type: object + type: array image: description: Main image of Robot. It is derived either from the specifications or determined directly over labels. diff --git a/pom.xml b/pom.xml index 3bf9f40f..e1a57274 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 io.roboscale.robot robot-fabric8-client - 0.1.0-alpha.9 + 0.1.0-alpha.10 robot-fabric8-client https://robolaunch.io diff --git a/src/main/java/io/roboscale/robot/v1alpha1/MetricsExporterSpec.java b/src/main/java/io/roboscale/robot/v1alpha1/MetricsExporterSpec.java index dfe0472f..0937f92f 100644 --- a/src/main/java/io/roboscale/robot/v1alpha1/MetricsExporterSpec.java +++ b/src/main/java/io/roboscale/robot/v1alpha1/MetricsExporterSpec.java @@ -1,7 +1,7 @@ package io.roboscale.robot.v1alpha1; @com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) -@com.fasterxml.jackson.annotation.JsonPropertyOrder({"gpu","network"}) +@com.fasterxml.jackson.annotation.JsonPropertyOrder({"gpu","network","storage"}) @com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) @javax.annotation.processing.Generated("io.fabric8.java.generator.CRGeneratorRunner") public class MetricsExporterSpec implements io.fabric8.kubernetes.api.model.KubernetesResource { @@ -37,5 +37,21 @@ public io.roboscale.robot.v1alpha1.metricsexporterspec.Network getNetwork() { public void setNetwork(io.roboscale.robot.v1alpha1.metricsexporterspec.Network network) { this.network = network; } + + /** + * Configurational parameters about storage metrics collection. + */ + @com.fasterxml.jackson.annotation.JsonProperty("storage") + @com.fasterxml.jackson.annotation.JsonPropertyDescription("Configurational parameters about storage metrics collection.") + @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) + private io.roboscale.robot.v1alpha1.metricsexporterspec.Storage storage; + + public io.roboscale.robot.v1alpha1.metricsexporterspec.Storage getStorage() { + return storage; + } + + public void setStorage(io.roboscale.robot.v1alpha1.metricsexporterspec.Storage storage) { + this.storage = storage; + } } diff --git a/src/main/java/io/roboscale/robot/v1alpha1/RobotStatus.java b/src/main/java/io/roboscale/robot/v1alpha1/RobotStatus.java index 55bf7e9e..0bef088f 100644 --- a/src/main/java/io/roboscale/robot/v1alpha1/RobotStatus.java +++ b/src/main/java/io/roboscale/robot/v1alpha1/RobotStatus.java @@ -1,7 +1,7 @@ package io.roboscale.robot.v1alpha1; @com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) -@com.fasterxml.jackson.annotation.JsonPropertyOrder({"attachedBuildObject","attachedDevObjects","attachedLaunchObjects","discoveryServerStatus","image","loaderJobStatus","nodeName","persistentDirs","phase","robotDevSuiteStatus","rosBridgeStatus","uid","workspaceManagerStatus"}) +@com.fasterxml.jackson.annotation.JsonPropertyOrder({"attachedBuildObject","attachedDevObjects","attachedLaunchObjects","discoveryServerStatus","hostDirs","image","loaderJobStatus","nodeName","persistentDirs","phase","robotDevSuiteStatus","rosBridgeStatus","uid","workspaceManagerStatus"}) @com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) @javax.annotation.processing.Generated("io.fabric8.java.generator.CRGeneratorRunner") public class RobotStatus implements io.fabric8.kubernetes.api.model.KubernetesResource { @@ -70,6 +70,22 @@ public void setDiscoveryServerStatus(io.roboscale.robot.v1alpha1.robotstatus.Dis this.discoveryServerStatus = discoveryServerStatus; } + /** + * [*alpha*] List of directories mounted from host. + */ + @com.fasterxml.jackson.annotation.JsonProperty("hostDirs") + @com.fasterxml.jackson.annotation.JsonPropertyDescription("[*alpha*] List of directories mounted from host.") + @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) + private java.util.List hostDirs; + + public java.util.List getHostDirs() { + return hostDirs; + } + + public void setHostDirs(java.util.List hostDirs) { + this.hostDirs = hostDirs; + } + /** * Main image of Robot. It is derived either from the specifications or determined directly over labels. */ diff --git a/src/main/java/io/roboscale/robot/v1alpha1/metricsexporterspec/Storage.java b/src/main/java/io/roboscale/robot/v1alpha1/metricsexporterspec/Storage.java new file mode 100644 index 00000000..0df9b113 --- /dev/null +++ b/src/main/java/io/roboscale/robot/v1alpha1/metricsexporterspec/Storage.java @@ -0,0 +1,41 @@ +package io.roboscale.robot.v1alpha1.metricsexporterspec; + +@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) +@com.fasterxml.jackson.annotation.JsonPropertyOrder({"interval","track"}) +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@javax.annotation.processing.Generated("io.fabric8.java.generator.CRGeneratorRunner") +public class Storage implements io.fabric8.kubernetes.api.model.KubernetesResource { + + /** + * Watching latency. + */ + @com.fasterxml.jackson.annotation.JsonProperty("interval") + @com.fasterxml.jackson.annotation.JsonPropertyDescription("Watching latency.") + @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) + private Long interval; + + public Long getInterval() { + return interval; + } + + public void setInterval(Long interval) { + this.interval = interval; + } + + /** + * MetricsExporter watches storage usage in the host machine if it's set to `true`. + */ + @com.fasterxml.jackson.annotation.JsonProperty("track") + @com.fasterxml.jackson.annotation.JsonPropertyDescription("MetricsExporter watches storage usage in the host machine if it's set to `true`.") + @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) + private Boolean track; + + public Boolean getTrack() { + return track; + } + + public void setTrack(Boolean track) { + this.track = track; + } +} + diff --git a/src/main/java/io/roboscale/robot/v1alpha1/metricsexporterstatus/Usage.java b/src/main/java/io/roboscale/robot/v1alpha1/metricsexporterstatus/Usage.java index a6ce35bc..7ed992f0 100644 --- a/src/main/java/io/roboscale/robot/v1alpha1/metricsexporterstatus/Usage.java +++ b/src/main/java/io/roboscale/robot/v1alpha1/metricsexporterstatus/Usage.java @@ -1,7 +1,7 @@ package io.roboscale.robot.v1alpha1.metricsexporterstatus; @com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) -@com.fasterxml.jackson.annotation.JsonPropertyOrder({"gpu","gpuInstanceUsage","gpuModel","network"}) +@com.fasterxml.jackson.annotation.JsonPropertyOrder({"gpu","gpuInstanceUsage","gpuModel","network","storage"}) @com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) @javax.annotation.processing.Generated("io.fabric8.java.generator.CRGeneratorRunner") public class Usage implements io.fabric8.kubernetes.api.model.KubernetesResource { @@ -69,5 +69,21 @@ public io.roboscale.robot.v1alpha1.metricsexporterstatus.usage.Network getNetwor public void setNetwork(io.roboscale.robot.v1alpha1.metricsexporterstatus.usage.Network network) { this.network = network; } + + /** + * Storage usage information + */ + @com.fasterxml.jackson.annotation.JsonProperty("storage") + @com.fasterxml.jackson.annotation.JsonPropertyDescription("Storage usage information") + @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) + private io.roboscale.robot.v1alpha1.metricsexporterstatus.usage.Storage storage; + + public io.roboscale.robot.v1alpha1.metricsexporterstatus.usage.Storage getStorage() { + return storage; + } + + public void setStorage(io.roboscale.robot.v1alpha1.metricsexporterstatus.usage.Storage storage) { + this.storage = storage; + } } diff --git a/src/main/java/io/roboscale/robot/v1alpha1/metricsexporterstatus/usage/GpuInstanceUsage.java b/src/main/java/io/roboscale/robot/v1alpha1/metricsexporterstatus/usage/GpuInstanceUsage.java index 3a17a8dd..48a1ad5f 100644 --- a/src/main/java/io/roboscale/robot/v1alpha1/metricsexporterstatus/usage/GpuInstanceUsage.java +++ b/src/main/java/io/roboscale/robot/v1alpha1/metricsexporterstatus/usage/GpuInstanceUsage.java @@ -12,7 +12,7 @@ public class GpuInstanceUsage implements io.fabric8.kubernetes.api.model.Kuberne @com.fasterxml.jackson.annotation.JsonProperty("allocated") @com.fasterxml.jackson.annotation.JsonPropertyDescription("Number of allocated virtual cores.") @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) - private String allocated; + private String allocated = "0"; public String getAllocated() { return allocated; diff --git a/src/main/java/io/roboscale/robot/v1alpha1/metricsexporterstatus/usage/Storage.java b/src/main/java/io/roboscale/robot/v1alpha1/metricsexporterstatus/usage/Storage.java new file mode 100644 index 00000000..7a00cadb --- /dev/null +++ b/src/main/java/io/roboscale/robot/v1alpha1/metricsexporterstatus/usage/Storage.java @@ -0,0 +1,41 @@ +package io.roboscale.robot.v1alpha1.metricsexporterstatus.usage; + +@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) +@com.fasterxml.jackson.annotation.JsonPropertyOrder({"lastUpdateTimestamp","usage"}) +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@javax.annotation.processing.Generated("io.fabric8.java.generator.CRGeneratorRunner") +public class Storage implements io.fabric8.kubernetes.api.model.KubernetesResource { + + /** + * Last update time. + */ + @com.fasterxml.jackson.annotation.JsonProperty("lastUpdateTimestamp") + @com.fasterxml.jackson.annotation.JsonPropertyDescription("Last update time.") + @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) + private String lastUpdateTimestamp; + + public String getLastUpdateTimestamp() { + return lastUpdateTimestamp; + } + + public void setLastUpdateTimestamp(String lastUpdateTimestamp) { + this.lastUpdateTimestamp = lastUpdateTimestamp; + } + + /** + * Usage values of filesystems. + */ + @com.fasterxml.jackson.annotation.JsonProperty("usage") + @com.fasterxml.jackson.annotation.JsonPropertyDescription("Usage values of filesystems.") + @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) + private java.util.Map usage; + + public java.util.Map getUsage() { + return usage; + } + + public void setUsage(java.util.Map usage) { + this.usage = usage; + } +} + diff --git a/src/main/java/io/roboscale/robot/v1alpha1/metricsexporterstatus/usage/storage/Usage.java b/src/main/java/io/roboscale/robot/v1alpha1/metricsexporterstatus/usage/storage/Usage.java new file mode 100644 index 00000000..187ed94f --- /dev/null +++ b/src/main/java/io/roboscale/robot/v1alpha1/metricsexporterstatus/usage/storage/Usage.java @@ -0,0 +1,73 @@ +package io.roboscale.robot.v1alpha1.metricsexporterstatus.usage.storage; + +@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) +@com.fasterxml.jackson.annotation.JsonPropertyOrder({"mountedOn","percentage","size","used"}) +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@javax.annotation.processing.Generated("io.fabric8.java.generator.CRGeneratorRunner") +public class Usage implements io.fabric8.kubernetes.api.model.KubernetesResource { + + /** + * Directory that the filesystem mounted on. + */ + @com.fasterxml.jackson.annotation.JsonProperty("mountedOn") + @com.fasterxml.jackson.annotation.JsonPropertyDescription("Directory that the filesystem mounted on.") + @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) + private String mountedOn; + + public String getMountedOn() { + return mountedOn; + } + + public void setMountedOn(String mountedOn) { + this.mountedOn = mountedOn; + } + + /** + * Usage percentage of a filesystem. + */ + @com.fasterxml.jackson.annotation.JsonProperty("percentage") + @com.fasterxml.jackson.annotation.JsonPropertyDescription("Usage percentage of a filesystem.") + @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) + private String percentage; + + public String getPercentage() { + return percentage; + } + + public void setPercentage(String percentage) { + this.percentage = percentage; + } + + /** + * Size of the filesystem. + */ + @com.fasterxml.jackson.annotation.JsonProperty("size") + @com.fasterxml.jackson.annotation.JsonPropertyDescription("Size of the filesystem.") + @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) + private String size; + + public String getSize() { + return size; + } + + public void setSize(String size) { + this.size = size; + } + + /** + * Size of the used parts of a filesystem. + */ + @com.fasterxml.jackson.annotation.JsonProperty("used") + @com.fasterxml.jackson.annotation.JsonPropertyDescription("Size of the used parts of a filesystem.") + @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) + private String used; + + public String getUsed() { + return used; + } + + public void setUsed(String used) { + this.used = used; + } +} + diff --git a/src/main/java/io/roboscale/robot/v1alpha1/robotstatus/HostDirs.java b/src/main/java/io/roboscale/robot/v1alpha1/robotstatus/HostDirs.java new file mode 100644 index 00000000..a3b53acc --- /dev/null +++ b/src/main/java/io/roboscale/robot/v1alpha1/robotstatus/HostDirs.java @@ -0,0 +1,45 @@ +package io.roboscale.robot.v1alpha1.robotstatus; + +@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) +@com.fasterxml.jackson.annotation.JsonPropertyOrder({"hostPath","internalPath","name"}) +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@javax.annotation.processing.Generated("io.fabric8.java.generator.CRGeneratorRunner") +public class HostDirs implements io.fabric8.kubernetes.api.model.KubernetesResource { + + @com.fasterxml.jackson.annotation.JsonProperty("hostPath") + @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) + private String hostPath; + + public String getHostPath() { + return hostPath; + } + + public void setHostPath(String hostPath) { + this.hostPath = hostPath; + } + + @com.fasterxml.jackson.annotation.JsonProperty("internalPath") + @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) + private String internalPath; + + public String getInternalPath() { + return internalPath; + } + + public void setInternalPath(String internalPath) { + this.internalPath = internalPath; + } + + @com.fasterxml.jackson.annotation.JsonProperty("name") + @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP) + private String name; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} +