io.fabric8.kubernetes.api.model.storage.CSINodeDriver Maven / Gradle / Ivy
The newest version!
package io.fabric8.kubernetes.api.model.storage;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Generated;
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.builder.Editable;
import io.fabric8.kubernetes.api.model.Container;
import io.fabric8.kubernetes.api.model.ContainerPort;
import io.fabric8.kubernetes.api.model.EnvVar;
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.fabric8.kubernetes.api.model.Volume;
import io.fabric8.kubernetes.api.model.VolumeMount;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.BuildableReference;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
/**
* CSINodeDriver holds information about the specification of one CSI driver installed on a node
*/
@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"allocatable",
"name",
"nodeID",
"topologyKeys"
})
@ToString
@EqualsAndHashCode
@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),
@BuildableReference(EnvVar.class),
@BuildableReference(ContainerPort.class),
@BuildableReference(Volume.class),
@BuildableReference(VolumeMount.class)
})
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator")
public class CSINodeDriver implements Editable, KubernetesResource
{
@JsonProperty("allocatable")
private VolumeNodeResources allocatable;
@JsonProperty("name")
private String name;
@JsonProperty("nodeID")
private String nodeID;
@JsonProperty("topologyKeys")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List topologyKeys = new ArrayList<>();
@JsonIgnore
private Map additionalProperties = new LinkedHashMap();
/**
* No args constructor for use in serialization
*/
public CSINodeDriver() {
}
public CSINodeDriver(VolumeNodeResources allocatable, String name, String nodeID, List topologyKeys) {
super();
this.allocatable = allocatable;
this.name = name;
this.nodeID = nodeID;
this.topologyKeys = topologyKeys;
}
/**
* CSINodeDriver holds information about the specification of one CSI driver installed on a node
*/
@JsonProperty("allocatable")
public VolumeNodeResources getAllocatable() {
return allocatable;
}
/**
* CSINodeDriver holds information about the specification of one CSI driver installed on a node
*/
@JsonProperty("allocatable")
public void setAllocatable(VolumeNodeResources allocatable) {
this.allocatable = allocatable;
}
/**
* name represents the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.
*/
@JsonProperty("name")
public String getName() {
return name;
}
/**
* name represents the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.
*/
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
/**
* nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as "node1", but the storage system may refer to the same node as "nodeA". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. "nodeA" instead of "node1". This field is required.
*/
@JsonProperty("nodeID")
public String getNodeID() {
return nodeID;
}
/**
* nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as "node1", but the storage system may refer to the same node as "nodeA". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. "nodeA" instead of "node1". This field is required.
*/
@JsonProperty("nodeID")
public void setNodeID(String nodeID) {
this.nodeID = nodeID;
}
/**
* topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. "company.com/zone", "company.com/region"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.
*/
@JsonProperty("topologyKeys")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List getTopologyKeys() {
return topologyKeys;
}
/**
* topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. "company.com/zone", "company.com/region"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.
*/
@JsonProperty("topologyKeys")
public void setTopologyKeys(List topologyKeys) {
this.topologyKeys = topologyKeys;
}
@JsonIgnore
public CSINodeDriverBuilder edit() {
return new CSINodeDriverBuilder(this);
}
@JsonIgnore
public CSINodeDriverBuilder toBuilder() {
return edit();
}
@JsonAnyGetter
public Map getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
public void setAdditionalProperties(Map additionalProperties) {
this.additionalProperties = additionalProperties;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy