-
Notifications
You must be signed in to change notification settings - Fork 0
/
kubernetes.go
59 lines (45 loc) · 1.77 KB
/
kubernetes.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Copyright 2018 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.
package storage
// KubernetesFilesystemParams is a fully specified set of parameters for filesystem creation,
// derived from one or more of user-specified storage directives, a
// storage pool definition, and charm storage metadata.
type KubernetesFilesystemParams struct {
// StorageName is the name of the storage as specified in the charm.
StorageName string
// Size is the minimum size of the filesystem in MiB.
Size uint64
// The provider type for this filesystem.
Provider ProviderType
// Attributes is a set of provider-specific options for storage creation,
// as defined in a storage pool.
Attributes map[string]interface{}
// ResourceTags is a set of tags to set on the created filesystem, if the
// storage provider supports tags.
ResourceTags map[string]string
// Attachment identifies the mount point the filesystem should be
// mounted at.
Attachment *KubernetesFilesystemAttachmentParams
}
// KubernetesFilesystemAttachmentParams is a set of parameters for filesystem attachment
// or detachment.
type KubernetesFilesystemAttachmentParams struct {
AttachmentParams
// Path is the path at which the filesystem is to be mounted on the pod that
// this attachment corresponds to.
Path string
}
// FilesystemAttachmentInfo describes a filesystem attachment.
type KubernetesFilesystemInfo struct {
// MountPoint is the path the filesystem is mounted at.
MountPoint string
// ReadOnly is true if the filesystem is readonly.
ReadOnly bool
// FilesystemId is a unique provider id for the filesystem.
FilesystemId string
// Pool is the name of the storage pool used to
// allocate the filesystem.
Pool string
// Size is the size of the filesystem in MiB.
Size uint64
}