Skip to content

Commit

Permalink
Add volumeClaimTemplates to the filesystem backend (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
Md Kamol Hasan authored and tamalsaha committed Jan 6, 2020
1 parent 073d2a4 commit 659420c
Show file tree
Hide file tree
Showing 22 changed files with 968 additions and 509 deletions.
4 changes: 2 additions & 2 deletions api/crds/bindata.go

Large diffs are not rendered by default.

304 changes: 304 additions & 0 deletions api/crds/kubevault.com_vaultservers.yaml

Large diffs are not rendered by default.

195 changes: 195 additions & 0 deletions api/openapi-spec/swagger.json
Expand Up @@ -17258,6 +17258,10 @@
"path": {
"description": "The absolute path on disk to the directory where the data will be stored. If the directory does not exist, Vault will create it.",
"type": "string"
},
"volumeClaimTemplate": {
"description": "volumeClaimTemplate is a claim that pods are allowed to reference. The VaultServer controller is responsible for deploying the claim and update the volumeMounts in the Vault server container in the template.",
"$ref": "#/definitions/xyz.kmodules.offshoot-api.api.v1.PersistentVolumeClaim"
}
}
},
Expand Down Expand Up @@ -19181,6 +19185,108 @@
}
}
},
"io.k8s.api.core.v1.PersistentVolumeClaimCondition": {
"description": "PersistentVolumeClaimCondition contails details about state of pvc",
"type": "object",
"required": [
"type",
"status"
],
"properties": {
"lastProbeTime": {
"description": "Last time we probed the condition.",
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time"
},
"lastTransitionTime": {
"description": "Last time the condition transitioned from one status to another.",
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time"
},
"message": {
"description": "Human-readable message indicating details about last transition.",
"type": "string"
},
"reason": {
"description": "Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"ResizeStarted\" that means the underlying persistent volume is being resized.",
"type": "string"
},
"status": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"io.k8s.api.core.v1.PersistentVolumeClaimSpec": {
"description": "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes",
"type": "object",
"properties": {
"accessModes": {
"description": "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1",
"type": "array",
"items": {
"type": "string"
}
},
"dataSource": {
"description": "This field requires the VolumeSnapshotDataSource alpha feature gate to be enabled and currently VolumeSnapshot is the only supported data source. If the provisioner can support VolumeSnapshot data source, it will create a new volume and data will be restored to the volume at the same time. If the provisioner does not support VolumeSnapshot data source, volume will not be created and the failure will be reported as an event. In the future, we plan to support more data source types and the behavior of the provisioner may change.",
"$ref": "#/definitions/io.k8s.api.core.v1.TypedLocalObjectReference"
},
"resources": {
"description": "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources",
"$ref": "#/definitions/io.k8s.api.core.v1.ResourceRequirements"
},
"selector": {
"description": "A label query over volumes to consider for binding.",
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"
},
"storageClassName": {
"description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1",
"type": "string"
},
"volumeMode": {
"description": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is a beta feature.",
"type": "string"
},
"volumeName": {
"description": "VolumeName is the binding reference to the PersistentVolume backing this claim.",
"type": "string"
}
}
},
"io.k8s.api.core.v1.PersistentVolumeClaimStatus": {
"description": "PersistentVolumeClaimStatus is the current status of a persistent volume claim.",
"type": "object",
"properties": {
"accessModes": {
"description": "AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1",
"type": "array",
"items": {
"type": "string"
}
},
"capacity": {
"description": "Represents the actual resources of the underlying volume.",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity"
}
},
"conditions": {
"description": "Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.",
"type": "array",
"items": {
"$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimCondition"
},
"x-kubernetes-patch-merge-key": "type",
"x-kubernetes-patch-strategy": "merge"
},
"phase": {
"description": "Phase represents the current phase of PersistentVolumeClaim.",
"type": "string"
}
}
},
"io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource": {
"description": "PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).",
"type": "object",
Expand Down Expand Up @@ -19874,6 +19980,28 @@
}
}
},
"io.k8s.api.core.v1.TypedLocalObjectReference": {
"description": "TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.",
"type": "object",
"required": [
"kind",
"name"
],
"properties": {
"apiGroup": {
"description": "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.",
"type": "string"
},
"kind": {
"description": "Kind is the type of resource being referenced",
"type": "string"
},
"name": {
"description": "Name is the name of resource being referenced",
"type": "string"
}
}
},
"io.k8s.api.core.v1.VolumeDevice": {
"description": "volumeDevice describes a mapping of a raw block device within a container.",
"type": "object",
Expand Down Expand Up @@ -20994,6 +21122,73 @@
}
}
},
"xyz.kmodules.offshoot-api.api.v1.PartialObjectMeta": {
"description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.",
"type": "object",
"properties": {
"annotations": {
"description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"generateName": {
"description": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency",
"type": "string"
},
"labels": {
"description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"name": {
"description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names",
"type": "string"
},
"namespace": {
"description": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces",
"type": "string"
},
"ownerReferences": {
"description": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.",
"type": "array",
"items": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference"
},
"x-kubernetes-patch-merge-key": "uid",
"x-kubernetes-patch-strategy": "merge"
}
}
},
"xyz.kmodules.offshoot-api.api.v1.PersistentVolumeClaim": {
"description": "PersistentVolumeClaim is a user's request for and claim to a persistent volume",
"type": "object",
"properties": {
"apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"type": "string"
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": "string"
},
"metadata": {
"description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
"$ref": "#/definitions/xyz.kmodules.offshoot-api.api.v1.PartialObjectMeta"
},
"spec": {
"description": "Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims",
"$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimSpec"
},
"status": {
"description": "Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims",
"$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimStatus"
}
}
},
"xyz.kmodules.offshoot-api.api.v1.PodSpec": {
"type": "object",
"properties": {
Expand Down
8 changes: 1 addition & 7 deletions apis/catalog/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions apis/config/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions apis/engine/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 659420c

Please sign in to comment.