Resource Definitions
Driver
Capability
Flavor
Resource Type
Volumes
This section contains Resource Definitions examples for handling Kubernetes Volumes by using the volume-nfs
Driver. If you have special requirements for your PersistentVolume
implementation, you can see this other example using the template
Driver .
You can find a Score file example using the volume
resource type here .
Resource Definitions #
volume-nfs.yaml
(view on GitHub )
:
apiVersion: entity.humanitec.io/v1b1
kind: Definition
metadata:
id: volume-nfs
entity:
type: volume
name: volume-nfs
driver_type: humanitec/volume-nfs
driver_inputs:
values:
path: "/"
server: nfs-server.default.svc.cluster.local
criteria:
- class: nfs
volume-nfs.tf
(view on GitHub )
:
resource "humanitec_resource_definition" "volume-nfs" {
driver_type = "humanitec/volume-nfs"
id = "volume-nfs"
name = "volume-nfs"
type = "volume"
driver_inputs = {
values_string = jsonencode({
"path" = "/"
"server" = "nfs-server.default.svc.cluster.local"
})
}
}
resource "humanitec_resource_definition_criteria" "volume-nfs_criteria_0" {
resource_definition_id = resource.humanitec_resource_definition.volume-nfs.id
class = "nfs"
}