build: remove the edgefs operator from rook

The EdgeFS operator has been deprecated for some time in Rook.
If the replacement is added back to Rook it can be completed
according to the new guidelines in the documentation.
https://rook.io/docs/rook/master/storage-providers.html

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
This commit is contained in:
Travis Nielsen committed 2021-01-25 17:51:24 -07:00
1 parent 89a9a35e74
commit 53ed11f15b
156 files changed
+17 -22712

No files matched your search

-1
View File
@@ -14,7 +14,6 @@
"ci",
"core",
"docs",
"edgefs",
"nfs",
"test",
"yugabytedb"
-3
View File
@@ -19,9 +19,6 @@ areas:
- satoru-takeuchi
reviewers:
- Madhu-1
edgefs:
reviewers:
- sabbot
cassandra:
approvers:
- yanniszark
+3 -4
View File
@@ -18,10 +18,9 @@ See our [Quickstart](quickstart.md) guide list for the detailed instructions for
High-level Storage Provider design documents:
| Storage Provider | Status | Description |
| --------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Ceph](ceph-storage.md) | Stable | Ceph is a highly scalable distributed storage solution for block storage, object storage, and shared filesystems with years of production deployments. |
| [EdgeFS](edgefs-storage.md) | [Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989) | EdgeFS is high-performance and fault-tolerant decentralized data fabric with access to object, file, NoSQL and block. |
| Storage Provider | Status | Description |
| ----------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Ceph](ceph-storage.md) | Stable | Ceph is a highly scalable distributed storage solution for block storage, object storage, and shared filesystems with years of production deployments. |
Low level design documentation for supported list of storage systems collected at [design docs](https://github.com/rook/rook/tree/master/design) section.
+1 -2
View File
@@ -43,7 +43,7 @@ cd rook
make
# build a single storage provider, where the IMAGES can be a subdirectory of the "images" folder:
# "cassandra", "ceph", "edgefs", or "nfs"
# "cassandra", "ceph", or "nfs"
make IMAGES="cassandra" build
# multiple storage providers can also be built
@@ -278,7 +278,6 @@ The `component` **MUST** be one of the following:
- ci
- core
- docs
- edgefs
- nfs
- test
- yugabytedb
-631
View File
@@ -1,631 +0,0 @@
---
title: Cluster CRD
weight: 4100
indent: true
---
# EdgeFS Cluster CRD
[Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989)
Rook allows creation and customization of storage clusters through the custom resource definitions (CRDs).
## Sample
To get you started, here is a simple example of a CRD to configure a EdgeFS cluster with just one local per-host directory /data:
```yaml
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
namespace: rook-edgefs
spec:
edgefsImageName: edgefs/edgefs:latest
serviceAccount: rook-edgefs-cluster
dataDirHostPath: /data
storage:
useAllNodes: true # use only for test deployments
```
or if you have raw block devices provisioned, it can dynamically detect, format and utilize all raw devices on all nodes with simple CRD as below:
```yaml
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
namespace: rook-edgefs
spec:
edgefsImageName: edgefs/edgefs:latest
serviceAccount: rook-edgefs-cluster
dataDirHostPath: /data
storage:
useAllNodes: true # use only for test deployments
useAllDevices: true
```
or if you want to just install it on **single node1, single SSD device /dev/sdb**, use this sample:
```yaml
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
namespace: rook-edgefs
spec:
edgefsImageName: edgefs/edgefs:latest
serviceAccount: rook-edgefs-cluster
dataDirHostPath: /data
sysRepCount: 1
failureDomain: "device"
storage:
useAllNodes: false
useAllDevices: false
config:
useAllSSD: "true"
useMetadataOffload: "false"
nodes:
- name: "node1"
devices:
- name: "sdb"
```
or if you want to just install it on **single node1, single directory /media**, use this sample:
```yaml
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
namespace: rook-edgefs
spec:
edgefsImageName: edgefs/edgefs:latest
serviceAccount: rook-edgefs-cluster
dataDirHostPath: /data
sysRepCount: 1
failureDomain: "device"
storage:
useAllNodes: false
useAllDevices: false
directories:
- path: /media # global for all nodes, cannot be per-node!
nodes:
- name: "node1"
```
In addition to the CRD, you will also need to create a namespace, role, and role binding as seen in the [common cluster resources](#common-cluster-resources) below.
## Settings
Settings can be specified at the global level to apply to the cluster as a whole, while other settings can be specified at more fine-grained levels, e.g. individual nodes. If any setting is unspecified, a suitable default will be used automatically.
### Cluster metadata
- `name`: The name that will be used internally for the EdgeFS cluster. Most commonly the name is the same as the namespace since multiple clusters are not supported in the same namespace.
- `namespace`: The Kubernetes namespace that will be created for the Rook cluster. The services, pods, and other resources created by the operator will be added to this namespace. The common scenario is to create a single Rook cluster. If multiple clusters are created, they must not have conflicting devices or host paths.
- `edgefsImageName`: EdgeFS image to use. If not specified then `edgefs/edgefs:latest` is used. We recommend to specify particular image version for production use, for example `edgefs/edgefs:1.2.124`.
### Cluster Settings
- `dataDirHostPath`: The path on the host ([hostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath)) where config and data should be stored for each of the services. If the directory does not exist, it will be created. Because this directory persists on the host, it will remain after pods are deleted. If `storage` settings not provided then provisioned hostPath will also be used as a storage device for Target pods (automatic provisioning via `rtlfs`).
- On **Minikube** environments, use `/data/rook`. Minikube boots into a tmpfs but it provides some [directories](https://github.com/kubernetes/minikube/blob/master/docs/persistent_volumes.md) where files can be persisted across reboots. Using one of these directories will ensure that Rook's data and configuration files are persisted and that enough storage space is available.
- **WARNING**: For test scenarios, if you delete a cluster and start a new cluster on the same hosts, the path used by `dataDirHostPath` must be deleted. Otherwise, stale information and other config will remain from the previous cluster and the new target will fail to start.
If this value is empty, each pod will get an ephemeral directory to store their config files that is tied to the lifetime of the pod running on that node. More details can be found in the Kubernetes [empty dir docs](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir).
- `dataVolumeSize`: Alternative to `dataDirHostPath`. If defined then Cluster CRD operator will disregard `dataDirHostPath` setting and instead will automatically claim persistent volume. If `storage` settings not provided then provisioned volume will also be used as a storage device for Target pods (automatic provisioning via `rtlfs`).
- `sysRepCount`: overrides the default (3) system replication count value. Can be set to 1 or 2 for a cluster with limited number of failure domains. For example, a single node setup with two disks can provide up to 2 replicas per chunk and requires `sysRepCount` to be set to 1 or 2.
- `failureDomain`: identifies the way chunk replicas are distributed across cluster's disks. The `device` domain requires each replicas to resides on different disks, the `host` domains implies one replica per node and the `zone` domain is for one replica per zone. If `failureDomain` option isn't specified, then the failure domain is set to `host` or `zone` depending on nodes config (see below). The `failureDomain` allows to specify the failure domain explicitly. For example, a single-node cluster with multiple nodes requires the `failureDomain` set to `device` if the `sysRepCount` > 1.
- `dashboard`: This specification may be used to override and enable additional [EdgeFS UI Dashboard](edgefs-ui.md) functionality.
- `localAddr`: Specifies local IP address to be used as Kubernetes external IP.
- `network`: [network configuration settings](#network-configuration-settings)
- `devicesResurrectMode`: When enabled, this mode attempts to recreate cluster based on previous CRD definition. If this flag set to one of the parameters, then operator will only adjust networking. Often used when clean up of old devices is needed. Only applicable when used with `dataDirHostPath`.
- `restore`: Attempt to restart and restore previously enabled cluster CRD.
- `restoreZap`: Attempt to re-initialize previously selected `devices` prior to restore. By default cluster assumes that selected devices have no logical partitions and considered empty.
- `restoreZapWait`: Attempt to cleanup previously selected `devices` and wait for cluster delete. This is useful when clean up of old devices is needed. Additional containers count should be specified if cluster was originally created with a total per-node capacity that exceeding `maxContainerCapacity` option, e.g., `devicesResurrectMode: "restoreZapWait: 2"`.
- `serviceAccount`: The service account under which the EdgeFS pods will run that will give access to ConfigMaps in the cluster's namespace. If not set, the default of `rook-edgefs-cluster` will be used.
- `chunkCacheSize`: Limit amount of memory allocated for dynamic chunk cache. By default Target pod uses up to 75% of available memory as chunk caching area. This option can influence this allocation strategy.
- `placement`: [placement configuration settings](#placement-configuration-settings)
- `resourceProfile`: Cluster segment wide resource utilization profile (Memory and CPU). Can be `embedded` or `performance` (default). In case of `performance` each Target pod requires at least 8Gi of memory and 4 CPU cores in terms of to operate efficiently. If `resources` limits are set to less then 8Gi of memory then operator will automatically set profile to `embedded`. In `embedded` profile case, Target pod requires 1Gi of memory and 2 CPU cores, where memory allocation is split between number of PLevels (see `rtPLevelOverride` option) with 64Mi minimally per one PLevel, 64Mi for Target pod itself and the rest for chunk cache (see `chunkCacheSize` option) that allocates up to 75% of available memory.
- `resources`: [resources configuration settings](#cluster-wide-resources-configuration-settings)
- `storage`: Storage selection and configuration that will be used across the cluster. Note that these settings can be overridden for specific nodes.
- `useAllNodes`: `true` or `false`, indicating if all nodes in the cluster should be used for storage according to the cluster level storage selection and configuration values.
If individual nodes are specified under the `nodes` field below, then `useAllNodes` must be set to `false`.
- `nodes`: Names of individual nodes in the cluster that should have their storage included in accordance with either the cluster level configuration specified above or any node specific overrides described in the next section below.
`useAllNodes` must be set to `false` to use specific nodes and their config.
- [storage selection settings](#storage-selection-settings)
- [storage configuration settings](#storage-configuration-settings)
- `skipHostPrepare`: By default all nodes selected for EdgeFS deployment will be automatically configured via preparation jobs. If this option set to `true` node configuration will be skipped.
- `trlogProcessingInterval`: Controls for how many seconds cluster would aggregate object modifications prior to processing it by accounting, bucket updates, ISGW Links and notifications components. Has to be defined in seconds and must be composite of 60, i.e. 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30. Default is 10. Recommended range is 2 - 20. This is cluster wide setting and cannot be easily changed after cluster is created. Any new node added has to reflect exactly the same setting.
- `trlogKeepDays`: Controls for how many days cluster need to keep transaction log interval batches with version manifest references. If you planning to have cluster disconnected from ISGW downlinks for longer period time, consider to increase this value. Default is 3. This is cluster wide setting and cannot be easily changed after cluster is created. The value can be fractional, e.g. 1.1 or 0.1
- `maxContainerCapacity`: Overrides default total disks capacity per target container. Default is "132Ti".
- `useHostLocalTime`: Force usage of the host's /etc/localtime inside EdgeFS containers. Default is `false`.
#### Node Updates
Nodes can be added and removed over time by updating the Cluster CRD, for example with `kubectl -n rook-edgefs edit cluster.edgefs.rook.io rook-edgefs`.
This will bring up your default text editor and allow you to add and remove storage nodes from the cluster.
This feature is only available when `useAllNodes` has been set to `false`.
### Node Settings
In addition to the cluster level settings specified above, each individual node can also specify configuration to override the cluster level settings and defaults.
If a node does not specify any configuration then it will inherit the cluster level settings.
- `name`: The name of the node, which should match its `kubernetes.io/hostname` label.
- `config`: Config settings applied to all VDEVs on the node unless overridden by `devices` or `directories`. See the [config settings](#storage-configuration-settings) below.
- [storage selection settings](#storage-selection-settings)
- [storage configuration settings](#storage-configuration-settings)
### Storage Selection Settings
Below are the settings available, both at the cluster and individual node level, for selecting which storage resources will be included in the cluster.
- `useAllDevices`: `true` or `false`, indicating whether all devices found on nodes in the cluster should be automatically consumed by Targets. This is recommended for controlled environments where you will not risk formatting of devices with existing data. When `true`, all devices will be used except those with partitions created or a local filesystem. This can be overridden by `deviceFilter`. **warning** Don't set this option to `true` for RTKVS disk backend.
- `deviceFilter`: A regular expression that allows selection of devices to be consumed by target. If individual devices have been specified for a node then this filter will be ignored. This field uses [golang regular expression syntax](https://golang.org/pkg/regexp/syntax/). For example:
- `sdb`: Only selects the `sdb` device if found
- `^sd.`: Selects all devices starting with `sd`
- `^sd[a-d]`: Selects devices starting with `sda`, `sdb`, `sdc`, and `sdd` if found
- `^s`: Selects all devices that start with `s`
- `^[^r]`: Selects all devices that do *not* start with `r`
- `devices`: A list of individual device names belonging to this node to include in the storage cluster. Mixing of `devices` and `directories` on the same node isn't supported.
- `name`: The name of the device (e.g., `sda`).
- `fullpath`: The full path to the device (e.g., `/dev/disk/by-id/scsi-35000c5008335c83f`). If specified then `name` can be omitted.
- `config`: Device-specific config settings. See the [config settings](#target-configuration-settings) below.
- `directories`: A list of directory paths on the nodes that will be included in the storage cluster. Note that using two directories on the same physical device can cause a negative performance impact. Since EdgeFS is leveraging StatefulSet, directories can only be defined at cluster level. Mixing of `devices` and `directories` on the same node isn't supported unless `rtkvs` disk engine is used. ** note **: For the `rtkvs` disk engine, at least one directory needs to be provided in order to store some small amount of metadata. For performance reasons, it would be better to have one directory per disk.
- `path`: The path on disk of the directory (e.g., `/rook/storage-dir`).
- `config`: Directory-specific config settings. See the [config settings](#target-configuration-settings) below.
### Storage Configuration Settings
The following storage selection settings are specific to EdgeFS and do not apply to other backends. All variables are key-value pairs represented as strings. While EdgeFS supports multiple backends, it is not recommended to mix them within same cluster. In case of `devices` (physical or emulated raw disks), EdgeFS will automatically use `rtrd` backend unless `useRtkvsBackend` is specified. In the latter case, the `rtkvs` engine will be chosen. In all other cases `rtlfs` (local filesystem) will be used.
> **IMPORTANT**: Keys needs to be case-sensitive and values has to be provided as strings.
- `useRtkvsBackend`: forces the cluster use the `rtkvs` disk engine and setting's value selects a key-value backend to be used. At the moment there is only backend named the `kvssd` for Samsung's KV SSD. The usage of `rtkvs` engine implies definition of one or several `device.name` or `device.fullpath` settings which have to point to backend's disk entries (see cluster_kvsdd.yaml).
- `walMode`: allows to enable/disable the Write-Ahead log (WAL). For `rtlfs` and `rtkvs` there are two options: `on` to enable or `off` to disable. It's better to keep it `on` unless `useAllSSD` or `useRtkvsBackend` are used. For `rtkvs`, there is an extra option: `metadata` which implies usage of WAL for data types which aren't stored on `rtkvs` backend (a KVSSD).
- `useMetadataOffload`: Dynamically detect appropriate SSD/NVMe device to use for the metadata on each node. Performance can be improved by using a low latency device as the metadata device, while other spinning platter (HDD) devices on a node are used to store data. Typical and recommended proportion is in range of 1:1 - 1:6. Default is false. Applicable only to `rtrd`.
- `useMetadataMask`: Defines what parts of metadata needs to be stored on offloaded devices. Default is 0xff, offload all metadata. To save SSD/NVMe capacity, set it to 0x7d to offload all except second level manifests. Applicable only to `rtrd`.
- `useBCache`: When `useMetadataOffload` is true, enable use of BCache. Default is false. Applicable only to `rtrd` and when host has "bcache" kernel module preloaded.
- `useBCacheWB`: When `useMetadataOffload` and `useBCache` is true, this option can enable use of BCache write-back cache. By default BCache only used as read cache in front of HDD. Applicable only to `rtrd`.
- `useAllSSD`: When set to true, only SSD/NVMe non rotational devices will be used. Default is false and if `useMetadataOffload` not defined then only rotational devices (HDDs) will be picked up during node provisioning phase. Is not applicable to `rtkvs`.
- `rtPLevelOverride`: In case of large devices or directories, it will be automatically partitioned into smaller parts around 500GB each. In case of embedded use cases, lowering the value would allow to operate with smaller memory footprint devices at the cost of performance. This option allows partitioning number override. Default is automatic. Typical and recommended range is 1 - 32. For `rtkvs` recommended plevel is 16.
- `hddReadAhead`: For all HDD or hybrid (SSD/HDD) use cases, adjusting hddReadAhead may provide significant boost in performance. Set to a value higher then 0, in KBs. Not applicable to `rtkvs`
- `mdReserved`: For hybrid (SSD/HDD) use case, adjusting mdReserved can be necessary when combined with BCache read/write caches. Allowed range 10-99% of automatically calcuated slice. Not applicable to `rtkvs`
- `rtVerifyChid`: Verify transferred or read payload. Payload can be data or metadata chunk of flexible size between 4K and 8MB. EdgeFS uses SHA-3 variant to cryptographically sign each chunk and uses it for self validation, self healing and FlexHash addressing. In case of low CPU systems verification after networking transfer prior to write can be disabled by setting this parameter to 0. In case of high CPU systems, verification after read but before networking transfer can be enabled by setting this parameter to 2. Default is 1, i.e. verify after networking transfer only. Setting it to 0 may improve CPU utilization at the cost of reduced availability. However, for objects with 3 or more replicas, availability isn't going to be visibly affected.
- `lmdbPageSize`: Defines default LMDB page size in bytes. Default is 16384. For capacity (all HDD) or hybrid (HDD/SSD) systems consider to increase this value to 32768 to achieve higher throughput performance. For all SSD and small database workloads, consider to decrease this to 8192 to achieve lower latency and higher IOPS. Please be advised that smaller values MAY cause fragmentation. Acceptable values are 4096, 8192, 16384 and 32768. Not applicable to `rtkvs`
- `lmdbMdPageSize`: Defines SSD metadata offload LMDB page size in bytes. Default is 8192. For large amount of small objects or files, consider to decrease this to 4096 to achieve better SSD capacity utilization. Acceptable values are 4096, 8192, 16384 and 32768. Not applicable to `rtkvs`
- `sync`: Defines default behavior of write operations at device or directory level. Acceptable values are 0, 1 (default), 2, 3.
- `0`: No syncing will happen. Highest performance possible and good for HPC scratch types of deployments. This option will still sustain crash of pods or software bugs. It will not sustain server power loss an may cause node / device level inconsistency.
- `1`: Default method. Will guarantee node / device consistency in case of power loss with reduced durability.
- `2`: Provides better durability in case of power loss at the cost of extra metadata syncing.
- `3`: Most durable and reliable option at the cost of significant performance impact.
- `maxSizeGB`: For `rtlfs`, defines maximum allowed size to use per directory in gigabytes. For `rtkvs` this is the maximum space the disk's metadata table can occupy.
- `zone`: Enables the node's failure domain number. Default value is 0 (no zoning). Zoning number is a logical failure domain tagging mechanism and if enabled then it has to be set for all the nodes in the cluster. See also, the `failureDomain`
- `noIP4Frag`: When set to `true` it prevents sending fragmented UDP traffic. **IMPORTANT**: maximum data chunk size will be redused significantly.
- `sysMaxChunkSize`: Set maximum allowed data chunk size expressed in bytes. Must be a power of two value. Default is 1M.
- `payloadS3URL`: When set, it activates payload data chunk forwarding to an external S3 server. The value is an URL of the S3 bucket the payload chunks will be put to. Example: http://s3.aws-region.amazonaws.com/bucket. Only applicable for RTRD (raw disk) engine. Disabled by default.
- `payloadS3Region`: S3 server region. Default is `us-east-1`. Only applicable when the `payloadS3URL` is set.
- `payloadS3MinKb`: a minimal payload chunk size to trigger the forwarding to the S3 bucket. Data chunks smaller than this value will be stored locally. Only applicable when the `payloadS3URL` is set.
- `payloadS3CapacityGB`: capacity of the external S3 bucket expressed in GB. This is an artificial value used to report accurate usage summary and to limit storage size. Only applicable when the `payloadS3URL` is set.
- `payloadS3Secret`: name of a Kubernetes secret to be used as an external S3 bucket credential. The secret needs to be pre-creted before deployment of the EdgeFS cluster and resides in the same namespace as the cluster. Secret's key need to be set to `cred` and value format is as follow: `<aws_key>,<aws_secret>`. See an example in the s3PayloadSecret.yaml
### Placement Configuration Settings
Placement configuration for the cluster services. It includes the following keys: `mgr`, `target` and `all`. Each service will have its placement configuration generated by merging the generic configuration under `all` with the most specific one (which will override any attributes).
A Placement configuration is specified (according to the Kubernetes PodSpec) as:
- `nodeAffinity`: Kubernetes [NodeAffinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature)
- `podAffinity`: Kubernetes [PodAffinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature)
- `podAntiAffinity`: Kubernetes [PodAntiAffinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature)
- `tolerations`: list of Kubernetes [Toleration](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/)
The `mgr` pod does not allow `Pod` affinity or anti-affinity. This is because of the mgrs having built-in anti-affinity with each other through the operator. The operator chooses which nodes are to run a mgr on. Each mgr is then tied to a node with a node selector using a hostname.
### Network Configuration Settings
Configure the network that will be enabled for the cluster and services. This is optional and if not defined then the cluster default network's `eth0` will be used to construct cluster bucket network.
- `provider`: Specifies the network provider that will be used to connect the network interface. You can choose between `host`, and `multus`.
- `selectors`: List the network selector that will be used associated by a key. The available keys are `server` and `broker`.
- `server`: Specifies data daemon host's networking interface name or multus's network attachment selection annotation.
- `broker`: Specifies broker daemon host's networking interface name or multus's network attachment selection annotation.
For `multus` network provider, an already working cluster with multus networking is required. Network attachment definition that later will be attached to the cluster needs to be created before the Cluster CRD.
You can add the multus network attachment selection annotation selecting the created network attachment definition on `selectors`. Make sure to define the interface name that will be assigned by multus and choose only one syntax either the short or JSON form to define all the available keys.
### Cluster-wide Resources Configuration Settings
Resources should be specified so that the rook components are handled after [Kubernetes Pod Quality of Service classes](https://kubernetes.io/docs/tasks/configure-pod-container/quality-service-pod/).
This allows to keep rook components running when for example a node runs out of memory and the rook components are not killed depending on their Quality of Service class.
You can set resource requests/limits for rook components through the [Resource Requirements/Limits](#resource-requirementslimits) structure in the following keys:
- `mgr`: Set resource requests/limits for Mgrs.
- `target`: Set resource requests/limits for Targets.
### Resource Requirements/Limits
For more information on resource requests/limits see the official Kubernetes documentation: [Kubernetes - Managing Compute Resources for Containers](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container).
- `requests`: Requests for cpu or memory.
- `cpu`: Request for CPU (example: one CPU core `1`, 50% of one CPU core `500m`).
- `memory`: Limit for Memory (example: one gigabyte of memory `1Gi`, half a gigabyte of memory `512Mi`).
- `limits`: Limits for cpu or memory.
- `cpu`: Limit for CPU (example: one CPU core `1`, 50% of one CPU core `500m`).
- `memory`: Limit for Memory (example: one gigabyte of memory `1Gi`, half a gigabyte of memory `512Mi`).
### Kubernetes node labeling and selection
By default each Kubernetes node, available to deploy EdgeFS over it, will be treated as "target" EdgeFS instance. But cluster administrator able to label node as "gateway" node, such node will have no devices prepared for EdgeFS and will be used as EdgeFS dedicated service node.
To mark a node as a "gateway", the administrator can add a specific label to a node.
Label format: `<edgefs-namespace>-nodetype=gateway`, where `edgefs-namespace` is current namespace for EdgeFS cluster deployment, by default is `rook-edgefs`.
Example: `kubectl label node "k8s node name" rook-edgefs-nodetype=gateway`
## Samples
Here are several samples for configuring EdgeFS clusters. Each of the samples must also include the namespace and corresponding access granted for management by the EdgeFS operator. See the [common cluster resources](#common-cluster-resources) below.
### Storage configuration: All devices, All SSD/NVMes.
```yaml
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
namespace: rook-edgefs
spec:
edgefsImageName: edgefs/edgefs:latest
dataDirHostPath: /var/lib/rook
serviceAccount: rook-edgefs-cluster
# cluster level storage configuration and selection
storage:
useAllNodes: true
useAllDevices: true
deviceFilter:
location:
config:
useAllSSD: true
```
### Storage Configuration: Specific devices
Individual nodes and their config can be specified so that only the named nodes below will be used as storage resources.
Each node's 'name' field should match their 'kubernetes.io/hostname' label.
```yaml
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
namespace: rook-edgefs
spec:
edgefsImageName: edgefs/edgefs:latest
dataDirHostPath: /var/lib/rook
serviceAccount: rook-edgefs-cluster
# cluster level storage configuration and selection
storage:
useAllNodes: false
useAllDevices: false
deviceFilter:
location:
config:
rtVerifyChid: "0"
nodes:
- name: "172.17.4.201"
devices: # specific devices to use for storage can be specified for each node
- name: "sdb"
- name: "sdc"
config: # configuration can be specified at the node level which overrides the cluster level config
rtPLevelOverride: 8
- name: "172.17.4.301"
deviceFilter: "^sd."
```
### Storage Configuration: Samsung's KV SSD
A single nodes configuration with 2 KV SSDs. The host's /media directory should have at least 64GB of free space for metadata.
```yaml
spec:
edgefsImageName: edgefs/edgefs:1.2.0
serviceAccount: rook-edgefs-cluster
dataDirHostPath: /var/lib/edgefs
sysRepCount: 2
failureDomain: "device"
storage:
useAllNodes: false
directories:
- path: /media
useAllDevices: false
config:
useRtkvsBackend: kvssd
rtPLevelOverride: "16"
maxSizeGB: "32"
sync: "0"
walMode: "off"
nodes:
- name: "node1"
devices:
- fullpath: "/dev/disk/by-id/nvme-SAMSUNG_MZQLB3T8HALS-000AZ_S3VJNY0J600450"
- fullpath: "/dev/disk/by-id/nvme-SAMSUNG_MZQLB3T8HALS-000AZ_S3VJNY0K303383"
```
### Storage Configuration: payload forwarding to S3
A 4-nodes configuration with S3 payload forwarding enabled. Follow the next steps:
1. Create an EdgeFS namespace, default name is "rook-edgefs": `kubectl create ns rook-edgefs`
2. Create a S3 payload [secrets](https://kubernetes.io/docs/concepts/configuration/secret) in the EdgeFS namespace:
```yaml
apiVersion: v1
kind: Secret
metadata:
name: node185-s3payload-secret
namespace: rook-edgefs
type: Opaque
data:
cred: bm9kZTEsbm9kZTEK # aws key/secret made by a command "echo node1,node1 | base64"
---
apiVersion: v1
kind: Secret
metadata:
name: node186-s3payload-secret
namespace: rook-edgefs
type: Opaque
data:
cred: bm9kZTIsbm9kZTIK
---
apiVersion: v1
kind: Secret
metadata:
name: cluster-s3payload-secret
namespace: rook-edgefs
type: Opaque
data:
cred: Y2x1c3RlcixjbHVzdGVyCg==
```
3. Create EdgeFS cluster:
```yaml
spec:
edgefsImageName: edgefs/edgefs:1.2.0
serviceAccount: rook-edgefs-cluster
dataDirHostPath: /var/lib/edgefs
storage:
useAllNodes: false
useAllDevices: false
config:
useAllSSD: "true" # allSSD is a preferable configuration
useMetadataOffload: "false" # useMetadataOffload is not allowed
payloadS3URL: "http://http://s3.us-west-1.amazonaws.com/bucket # Default S3 bucket for all nodes
payloadS3Region: "us-west-1"
payloadS3MinKb: "128" # Payloads larger than 128K will got to S3 bucket
payloadS3CapacityGB: "1024" # S3 bucket capacity is 1TB
payloadS3Secret: "cluster-s3payload-secret" # Secter for default S3 bucket
nodes:
- name: node183 # node level storage configuration
devices:
- name: "sdb"
- name: "sdc"
- name: node184 # node level storage configuration
devices: # specific devices to use for storage can be specified for each node
- name: "sdb"
- name: "sdc"
- name: node185 # node level storage configuration
devices: # specific devices to use for storage can be specified for each node
- name: "sdb"
- name: "sdc"
config: # configuration can be specified at the node level which overrides the cluster level config
payloadS3URL: "http://s3.asia.amazonaws.com/bucket185"
payloadS3Region: "asia"
payloadS3Capacity: "1099511627776"
payloadS3Secret: "node185-s3payload-secret"
- name: node186 # node level storage configuration
devices: # specific devices to use for storage can be specified for each node
- name: "sdb"
- name: "sdc"
config: # configuration can be specified at the node level which overrides the cluster level config
payloadS3URL: "http://s3.asia.amazonaws.com/bucket186"
payloadS3Region: "asia"
payloadS3Capacity: "1099511627776"
payloadS3Secret: "node186-s3payload-secret"
```
### Node Affinity
To control where various services will be scheduled by Kubernetes, use the placement configuration sections below.
The example under 'all' would have all services scheduled on Kubernetes nodes labeled with 'role=storage' and
tolerate taints with a key of 'storage-node'.
```yaml
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
namespace: rook-edgefs
spec:
edgefsImageName: edgefs/edgefs:latest
dataDirHostPath: /var/lib/rook
serviceAccount: rook-edgefs-cluster
placement:
all:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: role
operator: In
values:
- storage-node
tolerations:
- key: storage-node
operator: Exists
mgr:
nodeAffinity:
tolerations:
target:
nodeAffinity:
tolerations:
```
### Resource requests/Limits
To control how many resources the rook components can request/use, you can set requests and limits in Kubernetes for them.
You can override these requests/limits for Targts per node when using `useAllNodes: false` in the `node` item in the `nodes` list.
```yaml
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
namespace: rook-edgefs
spec:
edgefsImageName: edgefs/edgefs:latest
dataDirHostPath: /var/lib/rook
serviceAccount: rook-edgefs-cluster
# cluster level resource requests/limits configuration
resources:
storage:
useAllNodes: false
nodes:
- name: "172.17.4.201"
resources:
limits:
cpu: "2"
memory: "4096Mi"
requests:
cpu: "2"
memory: "4096Mi"
```
### Network Configuration: Multus network
An example on how to configure the cluster network to use multus network. Here, a NetworkAttachmentDefinition named flannel on rook-edgefs namespace is assumed.
```yaml
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
namespace: rook-edgefs
spec:
edgefsImageName: edgefs/edgefs:latest
dataDirHostPath: /var/lib/rook
serviceAccount: rook-edgefs-cluster
network:
provider: multus
selectors:
server: flannel@net1
broker: flannel@net2
```
## Common Cluster Resources
Each EdgeFS cluster must be created in a namespace and also give access to the Rook operator to manage the cluster in the namespace. Creating the namespace and these controls must be added to each of the examples previously shown.
```yaml
apiVersion: v1
kind: Namespace
metadata:
name: rook-edgefs
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: rook-edgefs-cluster
namespace: rook-edgefs
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-edgefs-cluster
namespace: rook-edgefs
rules:
- apiGroups: [""]
resources: ["configmaps"]
verbs: [ "get", "list", "watch", "create", "update", "delete" ]
- apiGroups: [""]
resources: ["pods"]
verbs: [ "get", "list" ]
---
# Allow the operator to create resources in this cluster's namespace
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-edgefs-cluster-mgmt
namespace: rook-edgefs
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: rook-edgefs-cluster-mgmt
subjects:
- kind: ServiceAccount
name: rook-edgefs-system
namespace: rook-edgefs-system
---
# Allow the pods in this namespace to work with configmaps
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-edgefs-cluster
namespace: rook-edgefs
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: rook-edgefs-cluster
subjects:
- kind: ServiceAccount
name: rook-edgefs-cluster
namespace: rook-edgefs
---
apiVersion: apps/v1
kind: PodSecurityPolicy
metadata:
name: privileged
spec:
fsGroup:
rule: RunAsAny
privileged: true
runAsUser:
rule: RunAsAny
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
volumes:
- '*'
allowedCapabilities:
- '*'
hostPID: true
hostIPC: true
hostNetwork: false
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: privileged-psp-user
rules:
- apiGroups:
- apps
resources:
- podsecuritypolicies
resourceNames:
- privileged
verbs:
- use
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: rook-edgefs-system-psp
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: privileged-psp-user
subjects:
- kind: ServiceAccount
name: rook-edgefs-system
namespace: rook-edgefs-system
```
-391
View File
@@ -1,391 +0,0 @@
---
title: CSI driver
weight: 4700
indent: true
---
{% include_relative branch.liquid %}
# EdgeFS Rook integrated CSI driver, provisioner, attacher and snapshotter
[Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989)
[Container Storage Interface (CSI)](https://github.com/container-storage-interface/) driver, provisioner, attacher and snapshotter for EdgeFS Scale-Out NFS/ISCSI services
## Overview
EdgeFS CSI plugins implement an interface between CSI enabled Container Orchestrator (CO) and EdgeFS local cluster site. It allows dynamic and static provisioning of EdgeFS NFS exports and ISCSI LUNs, and attaching them to application workloads. With EdgeFS NFS/ISCSI implementation, I/O load can be spread-out across multiple PODs, thus eliminating I/O bottlenecks of classing single-node NFS/ISCSI and providing highly available persistent volumes. Current implementation of EdgeFS CSI plugins was tested in Kubernetes environment (requires Kubernetes 1.13+)
## Prerequisites
* Ensure your kubernetes cluster version is 1.13+
* Kubernetes cluster must allow privileged pods, this flag must be set for the API server and the kubelet
([instructions](https://github.com/kubernetes-csi/docs/blob/735f1ef4adfcb157afce47c64d750b71012c8151/book/src/Setup.md#enable-privileged-pods)):
```console
--allow-privileged=true
```
* Required the API server and the kubelet feature gates
([instructions](https://github.com/kubernetes-csi/docs/blob/735f1ef4adfcb157afce47c64d750b71012c8151/book/src/Setup.md#enabling-features)):
```console
--feature-gates=VolumeSnapshotDataSource=true,CSIDriverRegistry=true
```
* Mount propagation must be enabled, the Docker daemon for the cluster must allow shared mounts
([instructions](https://github.com/kubernetes-csi/docs/blob/735f1ef4adfcb157afce47c64d750b71012c8151/book/src/Setup.md#enabling-mount-propagation))
* Kubernetes CSI drivers require `CSIDriver` and `CSINodeInfo` resource types
[to be defined on the cluster](https://github.com/kubernetes-csi/docs/blob/460a49286fe164a78fde3114e893c48b572a36c8/book/src/Setup.md#csidriver-custom-resource-alpha).
Check if they are already defined:
```console
kubectl get customresourcedefinition.apiextensions.k8s.io/csidrivers.csi.storage.k8s.io
kubectl get customresourcedefinition.apiextensions.k8s.io/csinodeinfos.csi.storage.k8s.io
```
If the cluster doesn't have "csidrivers" and "csinodeinfos" resource types, create them:
```console
kubectl create -f https://raw.githubusercontent.com/kubernetes/csi-api/release-1.13/pkg/crd/manifests/csidriver.yaml
kubectl create -f https://raw.githubusercontent.com/kubernetes/csi-api/release-1.13/pkg/crd/manifests/csinodeinfo.yaml
```
* Depends on preferred CSI driver type, following utilities must be installed on each Kubernetes node (For Debian/Ubuntu based systems):
```console
# for NFS
apt install -y nfs-common rpcbind
# for ISCSI
apt install -y open-iscsi
```
## EdgeFS CSI drivers configuration
For each driver type (NFS/ISCSI) we have already prepared configuration files examples, there are:
* [EdgeFS CSI NFS driver config](https://github.com/rook/rook/tree/master/cluster/examples/kubernetes/edgefs/csi/nfs/edgefs-nfs-csi-driver-config.yaml)
* [EdgeFS CSI ISCSI driver config](https://github.com/rook/rook/tree/master/cluster/examples/kubernetes/edgefs/csi/iscsi/edgefs-iscsi-csi-driver-config.yaml)
Secret file configuration options example:
```console
# EdgeFS k8s cluster options
k8sEdgefsNamespaces: ["rook-edgefs"] # edgefs cluster namespace
k8sEdgefsMgmtPrefix: rook-edgefs-mgr # edgefs cluster management prefix
# EdgeFS csi operations options
cluster: cltest # substitution edgefs cluster name for csi operations
tenant: test # substitution edgefs tenant name for csi operations
#serviceFilter: "nfs01" # comma delimited list of allowed service names for filtering
# EdgeFS GRPC security options
username: admin # edgefs k8s cluster grpc service username
password: admin # edgefs k8s cluster grpc service password
```
Options for NFS and ISCSI configuration files
| `Name` | `Description` | `Default value` | `Required` | `Type` |
| ----------------------- | --------------------------------------------------------------------- | ------------------------------- | ---------- | ---------- |
| `k8sEdgefsNamespaces` | Array of Kubernetes cluster's namespaces for EdgeFS service discovery | `rook-edgefs` | true | both |
| `k8sEdgefsMgmtPrefix` | Rook EdgeFS cluster mgmt service prefix | `rook-edgefs-mgr` | true | both |
| `username` | EdgeFS gRPC API server privileged user | `admin` | true | both |
| `password` | EdgeFS gRPC API server password | `admin` | true | both |
| `cluster` | EdgeFS cluster namespace also known as 'region' | | false | both |
| `tenant` | EdgeFS tenant isolated namespace | | false | both |
| `bucket` | EdgeFS tenant bucket to use as a default | | false | ISCSI only |
| `serviceFilter` | Comma delimited list of allowed service names for filtering | `""` means all services allowed | false | both |
| `serviceBalancerPolicy` | Service selection policy [`minexportspolicy`, `randomservicepolicy`] | `minexportspolicy` | false | both |
| `chunksize` | Chunk size for actual volume, in bytes | `16384`, should be power of two | false | both |
| `blocksize` | Block size for actual volume, in bytes | `4096`, should be power of two | false | iSCSI only |
| `fsType` | New volume's filesystem type | `ext4`, `ext3`, `xfs` | ext4 | ISCSI only |
| `forceVolumeDeletion` | Automatically deletes EdgeFS volume after usage | `false` | false | both |
By using `k8sEdgefsNamespaces` and `k8sEdgefsMgmtPrefix` parameters, driver is capable of detecting ClusterIPs and Endpoint IPs to provision and attach volumes.
## Apply EdgeFS CSI NFS driver configuration
Check configuration options and create kubernetes secret for Edgefs CSI NFS plugin
```console
git clone --single-branch --branch {{ branchName }} https://github.com/rook/rook.git
cd rook/cluster/examples/kubernetes/edgefs/csi/nfs
kubectl create secret generic edgefs-nfs-csi-driver-config --from-file=./edgefs-nfs-csi-driver-config.yaml
```
## Deploy EdgeFS CSI NFS driver
After secret is created successfully, deploy EdgeFS CSI plugin, provisioner and attacher using the following command
```console
cd cluster/examples/kubernetes/edgefs/csi/nfs
kubectl apply -f edgefs-nfs-csi-driver.yaml
```
There should be number of EdgeFS CSI plugin PODs available running as a DaemonSet:
```console
...
NAMESPACE NAME READY STATUS RESTARTS AGE
default edgefs-nfs-csi-controller-0 4/4 Running 0 33s
default edgefs-nfs-csi-node-9st9n 2/2 Running 0 33s
default edgefs-nfs-csi-node-js7jp 2/2 Running 0 33s
default edgefs-nfs-csi-node-lhjgr 2/2 Running 0 33s
...
```
At this point configuration is all ready and available for consumption by applications.
## Pre-provisioned volumes (NFS)
This method allows to use already created exports in EdgeFS services. This method keeps exports provisioned after application PODs terminated.
Read more on how to create PersistentVolume specification for pre-provisioned volumes:
[Link to Pre-provisioned volumes manifest specification](https://kubernetes-csi.github.io/docs/Usage.html#pre-provisioned-volumes)
To test creation and mount pre-provisioned volume to pod execute example
> **NOTE**: Make sure that `volumeHandle: segment:service@cluster/tenant/bucket` in nginx.yaml already exist on EdgeFS cluster and served via any Edgefs NFS service. Any volumeHandle's parameters may be omitted and will be substituted via CSI configuration file parameters.
Examples:
```console
cd cluster/examples/kubernetes/edgefs/csi/nfs/examples
kubectl apply -f ./preprovisioned-edgefs-volume-nginx.yaml
```
## Dynamically provisioned volumes (NFS)
To setup the system for dynamic provisioning, administrator needs to setup a StorageClass pointing to the CSI driver’s external-provisioner and specifying any parameters required by the driver
[Link to dynamically provisioned volumes specification](https://kubernetes-csi.github.io/docs/Usage.html#dynamic-provisioning)
### Note
For dynamically provisioned volumes kubernetes will generate volume name automatically
(for example pvc-871068ed-8b5d-11e8-9dae-005056b37cb2)
Additional creation options should be passed as parameters in StorageClass definition i.e :
```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: edgefs-nfs-csi-storageclass
provisioner: io.edgefs.csi.nfs
parameters:
segment: rook-edgefs
service: nfs01
tenant: ten1
encryption: true
```
### Parameters
> **NOTE**: Parameters and their options are case sensitive and should be in lower case.
| `Name` | `Description` | `Allowed values` | `Default value` |
| ------------ | -------------------------------------------------------- | ------------------------------------------------- | --------------- |
| `segment` | Edgefs cluster namespace for current StorageClass or PV. | | rook-edgefs |
| `service` | Edgefs cluster service if not defined in secret | | |
| `cluster` | Edgefs cluster namespace if not defined in secret | | |
| `tenant` | Edgefs tenant namespace if not defined in secret | | |
| `chunksize` | Chunk size for actual volume, in bytes | should be power of two | 16384 bytes |
| `blocksize` | Block size for actual volume, in bytes | should be power of two | 4096 bytes |
| `acl` | Volume acl restrictions | | all |
| `ec` | Enables ccow erasure coding for volume | `true`, `false`, `0`, `1` | `false` |
| `ecmode` | Set ccow erasure mode data mode (If 'ec' option enabled) | `3:1:xor`, `2:2:rs`, `4:2:rs`, `6:2:rs`, `9:3:rs` | `6:2:rs` |
| `encryption` | Enables encryption for volume | `true`, `false`, `0`, `1` | `false` |
Example:
```console
cd cluster/examples/kubernetes/edgefs/csi/nfs/examples
kubectl apply -f ./dynamic-nginx.yaml
```
## Apply Edgefs CSI ISCSI driver configuration
Check configuration options and create kubernetes secret for Edgefs CSI ISCSI plugin
```console
cd cluster/examples/kubernetes/edgefs/csi/iscsi
kubectl create secret generic edgefs-iscsi-csi-driver-config --from-file=./edgefs-iscsi-csi-driver-config.yaml
```
## Deploy Edgefs CSI ISCSI driver
After secret is created successfully, deploy EdgeFS CSI plugin, provisioner, attacher and snapshotter using the following command
```console
cd cluster/examples/kubernetes/edgefs/csi/iscsi
kubectl apply -f edgefs-iscsi-csi-driver.yaml
```
There should be number of EdgeFS CSI ISCSI plugin PODs available running as a DaemonSet:
```console
...
NAMESPACE NAME READY STATUS RESTARTS AGE
default edgefs-iscsi-csi-controller-0 4/4 Running 0 12s
default edgefs-iscsi-csi-node-26464 2/2 Running 0 12s
default edgefs-iscsi-csi-node-p5r58 2/2 Running 0 12s
default edgefs-iscsi-csi-node-ptn2m 2/2 Running 0 12s
...
```
At this point configuration is all ready and available for consumption by applications.
## Pre-provisioned volumes (ISCSI)
This method allows to use already created exports in EdgeFS ISCSI services. This method keeps exports provisioned after application PODs terminated.
Read more on how to create PersistentVolume specification for pre-provisioned volumes:
[Link to Pre-provisioned volumes manifest specification](https://kubernetes-csi.github.io/docs/Usage.html#pre-provisioned-volumes)
To test creation and mount pre-provisioned volume to pod execute example:
> **NOTE**: Make sure that `volumeHandle: segment:service@cluster/tenant/bucket/lun` in nginx.yaml already exist on EdgeFS cluster and served via any Edgefs ISCSI service. Any volumeHandle's parameters may be omitted and will be substituted via CSI configuration file parameters.
Example:
```console
cd cluster/examples/kubernetes/edgefs/csi/iscsi/examples
kubectl apply -f ./preprovisioned-edgefs-volume-nginx.yaml
```
## Dynamically provisioned volumes (ISCSI)
For dynamic volume provisioning, the administrator needs to set up a _StorageClass_ pointing to the driver.
In this case Kubernetes generates volume name automatically (for example `pvc-ns-cfc67950-fe3c-11e8-a3ca-005056b857f8`).
Default driver configuration may be overwritten in `parameters` section:
[Link to dynamically provisioned volumes specification](https://kubernetes-csi.github.io/docs/Usage.html#dynamic-provisioning)
### Note for dynamically provisioned volumes
For dynamically provisioned volumes, Kubernetes will generate volume names automatically
(for example pvc-871068ed-8b5d-11e8-9dae-005056b37cb2).
To pass additional creation parameters, you can add them as parameters to your StorageClass definition.
Example:
```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: edgefs-iscsi-csi-storageclass
provisioner: io.edgefs.csi.nfs
parameters:
segment: rook-edgefs
service: iscsi01
cluster: cltest
tenant: test
bucket: bk1
encryption: true
```
### Parameters
> **NOTE**: Parameters and their options are case sensitive and should be in lower case.
| `Name` | `Description` | `Allowed values` | `Default value` |
| ------------ | --------------------------------------------------------- | -------------------------------------- | --------------- |
| `segment` | Edgefs cluster namespace for specific StorageClass or PV. | | `rook-edgefs` |
| `service` | Edgefs cluster service if not defined in secret | | |
| `cluster` | Edgefs cluster namespace if not defined in secret | | |
| `tenant` | Edgefs tenant namespace if not defined in secret | | |
| `bucket` | Edgefs bucket namespace if not defined in secret | | |
| `chunksize` | Chunk size for actual volume, in bytes | should be power of two | `16384` |
| `blocksize` | Blocksize size for actual volume, in bytes | should be power of two | `4096` |
| `fsType` | New volume's filesystem type | `ext4`, `ext3`, `xfs` | `ext4` |
| `acl` | Volume acl restrictions | | `all` |
| `ec` | Enables ccow erasure coding for volume | `true`, `false`, `0`, `1` | `false` |
| `ecmode` | Set ccow erasure mode data mode (If 'ec' option enabled) | `4:2:rs` ,`6:2:rs`, `4:2:rs`, `9:3:rs` | `4:2:rs` |
| `encryption` | Enables encryption for volume | `true`, `false`, `0`, `1` | `false` |
Example:
```console
cd cluster/examples/kubernetes/edgefs/csi/nfs/examples
kubectl apply -f ./dynamic-nginx.yaml
```
## EdgeFS CSI ISCSI driver snapshots and clones
### Getting information about existing snapshots
```console
# snapshot classes
kubectl get volumesnapshotclasses.snapshot.storage.k8s.io
# snapshot list
kubectl get volumesnapshots.snapshot.storage.k8s.io
# volumesnapshotcontents
kubectl get volumesnapshotcontents.snapshot.storage.k8s.io
```
### To create volume's clone from existing snapshot you should:
* Create snapshotter StorageClass [Example yaml](https://github.com/rook/rook/tree/master/cluster/examples/kubernetes/edgefs/csi/iscsi/examples/snapshots/snapshot-class.yaml)
* Have an existing PVC based on EdgeFS ISCSI LUN
* Take snapshot from volume [Example yaml](https://github.com/rook/rook/tree/master/cluster/examples/kubernetes/edgefs/csi/iscsi/examples/snapshots/create-snapshot.yaml)
* Clone volume from existing snapshot [Example yaml](https://github.com/rook/rook/tree/master/cluster/examples/kubernetes/edgefs/csi/iscsi/examples/snapshots/nginx-snapshot-clone-volume.yaml)
## Troubleshooting and log collection
For details about other configuration and deployment of NFS, ISCSI and EdgeFS CSI plugin, see Wiki pages:
* [Quick Start Guide](https://github.com/Nexenta/edgefs-csi/wiki/EdgeFS-CSI-Quick-Start-Guide)
Please submit an issue at: [Issues](https://github.com/Nexenta/edgefs-csi/issues)
## Troubleshooting
* Show installed drivers:
```console
kubectl get csidrivers.csi.storage.k8s.io
kubectl describe csidrivers.csi.storage.k8s.io
```
* Error:
```console
MountVolume.MountDevice failed for volume "pvc-ns-<...>" :
driver name io.edgefs.csi.iscsi not found in the list of registered CSI drivers
```
Make sure _kubelet_ is configured with `--root-dir=/var/lib/kubelet`, otherwise update paths in the driver yaml file
([all requirements](https://github.com/kubernetes-csi/docs/blob/387dce893e59c1fcf3f4192cbea254440b6f0f07/book/src/Setup.md#enabling-features)).
* "VolumeSnapshotDataSource" feature gate is disabled:
```console
vim /var/lib/kubelet/config.yaml
# ...
# featureGates:
# VolumeSnapshotDataSource: true
# ...
vim /etc/kubernetes/manifests/kube-apiserver.yaml
# ...
# - --feature-gates=VolumeSnapshotDataSource=true
# ...
```
* Driver logs (for ISCSI driver, to get NFS driver logs substitute iscsi to nfs)
```console
kubectl logs -f edgefs-iscsi-csi-controller-0 driver
kubectl logs -f $(kubectl get pods | awk '/edgefs-iscsi-csi-node-/ {print $1;exit}') driver
# combine all pods:
kubectl get pods | awk '/edgefs-iscsi-csi-node-/ {system("kubectl logs " $1 " driver &")}'
```
* Show termination message in case driver failed to run:
<!-- {% raw %} -->
```console
kubectl get pod edgefs-iscsi-csi-controller-0 -o go-template="{{range .status.containerStatuses}}{{.lastState.terminated.message}}{{end}}"
```
<!-- {% endraw %} -->
-150
View File
@@ -1,150 +0,0 @@
---
title: iSCSI Target CRD
weight: 4600
indent: true
---
# EdgeFS iSCSI Target CRD
[Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989)
Rook allows creation and customization of High Performance iSCSI Target compatible services through the custom resource definitions (CRDs).
The following settings are available for customization of iSCSI Target services.
## Sample
```yaml
apiVersion: edgefs.rook.io/v1
kind: ISCSI
metadata:
name: iscsi01
namespace: rook-edgefs
spec:
#chunkCacheSize: 1Gi
placement:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: role
# operator: In
# values:
# - iscsi-node
# tolerations:
# - key: iscsi-node
# operator: Exists
# podAffinity:
# podAntiAffinity:
#resourceProfile: embedded
resources:
# limits:
# cpu: "500m"
# memory: "1024Mi"
# requests:
# cpu: "500m"
# memory: "1024Mi"
# A key/value list of annotations
annotations:
# key: value
```
## Metadata
* `name`: The name of the iSCSI target service to create, which must match existing EdgeFS service.
* `namespace`: The namespace of the Rook cluster where the iSCSI Target service is created.
* `targetName`: The name for iSCSI target name. Default is iqn.2018-11.edgefs.io.
* `targetParams`: If specified, then some of iSCSI target protocol parameters can be overridden.
* `MaxRecvDataSegmentLength`: Value in range value range 512..16777215. Default is 524288.
* `DefaultTime2Retain`: Value in range 0..3600. Default is 60.
* `DefaultTime2Wait`: Value in range 0..3600. Default is 30.
* `FirstBurstLength`: Value in range 512..16777215. Default is 524288.
* `MaxBurstLength`: Value in range 512..16777215. Default is 1048576.
* `MaxQueueCmd`: Value in range 1..128. Default is 64.
* `chunkCacheSize`: Limit amount of memory allocated for dynamic chunk cache. By default iSCSI pod uses up to 75% of available memory as chunk caching area. This option can influence this allocation strategy.
* `annotations`: Key value pair list of annotations to add.
* `placement`: The iSCSI pods can be given standard Kubernetes placement restrictions with `nodeAffinity`, `tolerations`, `podAffinity`, and `podAntiAffinity` similar to placement defined for daemons configured by the [cluster CRD](/cluster/examples/kubernetes/edgefs/cluster.yaml).
* `resourceProfile`: iSCSI pod resource utilization profile (Memory and CPU). Can be `embedded` or `performance` (default). In case of `performance` an iSCSI pod trying to increase amount of internal I/O resources that results in higher performance at the cost of additional memory allocation and more CPU load. In `embedded` profile case, iSCSI pod gives preference to preserving memory over I/O and limiting chunk cache (see `chunkCacheSize` option). The `performance` profile is the default unless cluster wide `embedded` option is defined.
* `resources`: Set resource requests/limits for the iSCSI pods, see [Resource Requirements/Limits](edgefs-cluster-crd.md#resource-requirementslimits).
## Setting up EdgeFS namespace and tenant
For more detailed instructions please refer to [EdgeFS Wiki](https://github.com/Nexenta/edgefs/wiki).
Below is an exampmle procedure to get things initialized and configured.
Before new local namespace (or local site) can be used, it has to be initialized with FlexHash and special purpose root object.
FlexHash consists of dynamically discovered configuration and checkpoint of accepted distribution table. FlexHash is responsible for I/O direction and plays important role in dynamic load balancing logic. It defines so-called Negotiating Groups (typically across zoned 8-24 disks) and final table distribution across all the participating components, e.g. data nodes, service gateways and tools.
Root object holds system information and table of namespaces registered to a local site. Root object is always local and never shared between the sites.
To initialize system and prepare logical definitions, login to the toolbox as shown in this example:
```console
kubectl get po --all-namespaces | grep edgefs-mgr
kubectl exec -it -n rook-edgefs rook-edgefs-mgr-6cb9598469-czr7p -- env COLUMNS=$COLUMNS LINES=$LINES TERM=linux toolbox
```
Assumption at this point is that nodes are all configured and can be seen via the following command:
```console
efscli system status
```
1. Initialize EdgeFS cluster:
Verify that HW (or better say emulated in this case) configuration look normal and accept it
```console
efscli system init
```
At this point new dynamically discovered configuration checkpoint will be created at $NEDGE_HOME/var/run/flexhash-checkpoint.json
This will also create system "root" object, holding Site's Namespace. Namespace may consist of more then single region.
2. Create new local namespace (or we also call it "Region" or "Segment"):
```console
efscli cluster create Hawaii
```
3. Create logical tenants of cluster namespace "Hawaii", also buckets if needed:
```console
efscli tenant create Hawaii/Cola
efscli bucket create Hawaii/Cola/bk1
efscli tenant create Hawaii/Pepsi
efscli bucket create Hawaii/Pepsi/bk1
```
Now cluster is setup, services can be now created.
4. Create iSCSI Target services objects for tenants:
```console
efscli service create iscsi isc-cola
efscli service serve isc-cola Hawaii/Cola/bk1/lun1 X-volsize=10G,ccow-chunkmap-chunk-size=16384
efscli service serve isc-cola Hawaii/Cola/bk1/lun2 X-volsize=20G,ccow-chunkmap-chunk-size=131072
efscli service create iscsi isc-pepsi
efscli service serve isc-pepsi Hawaii/Pepsi/bk1/lun1 X-volsize=20G
```
5. Create ISCSI CRDs:
```yaml
apiVersion: edgefs.rook.io/v1
kind: ISCSI
metadata:
name: iscCola
namespace: rook-edgefs
```
```yaml
apiVersion: edgefs.rook.io/v1
kind: ISCSI
metadata:
name: iscPepsi
namespace: rook-edgefs
```
At this point two iSCSI Target services should be available and listening on default port 3260.
-222
View File
@@ -1,222 +0,0 @@
---
title: ISGW Link CRD
weight: 4200
indent: true
---
# EdgeFS ISGW (Inter-Segment GateWay) CRD
[Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989)
EdgeFS Inter-Segment Gateway link is a building block for EdgeFS cross-site, cross-cloud global namespace synchronization functionality.
It distributes modified chunks of data asynchronously and enables seamless as well as geographically transparent access to files, objects and block devices.
It is important to note that a file or a block device consists of one or more objects, and so, within EdgeFS scope, ultimately everything is an object, globally immutable and self-validated.
To create an analogy, EdgeFS concept of global immutability of modifications very similar to how git operates with repository commits and branches.
As such, this technique empowers EdgeFS users to construct and operate comprehensive wide-spread global namespaces with management overhead greatly simplified.
A file or object modified at a source site where ISGW link is setup will be immediately noticed by ISGW endpoint links, thus spread out the change.
Eventually, all the connected sites will receive file modification where only modified blocks get transferred.
![EdgeFS ISGW](media/edgefs-isgw.png)
Not only ISGW link reduces the amount of data needed to be transferred, it also deduplicating the transfers.
Matching globally unique cryptographic signatures of a file change will not be transferred, thus enabling global namespace deduplication.
ISGW link can be bi-directional, i.e. enabling same file/object modifications across the namespaces.
It works well for many use cases where application logic can ensure serialization of changes.
Single bi-directional link can connect two sites but it is possible to create as many non-overlapping links as needed.
ISGW link can also transparently synchronize file, object, directory, bucket or tenant level snapshots, grouped into so-called SnapView construct.
Thus, modification to a block device, for instance, can be consistently viewed across entire global namespace.
Because EdgeFS metadata is also globally immutable and unique, it is possible to enable a mode of transferring only metadata changes.
With this mode enabled, users can construct efficient access endpoints where modifications can be fetched on demand, as a result creating globally and geographically distributed cache fog aggregation with a built-in E-LRU eviction policy.
Local I/O at each site executed with the speed of media devices used. Modifications transferred eventually, and not slowing down local site running application workflow.
EdgeFS Rook Operator allows creation and customization of High-Performance Inter-Segment synchronization links through the custom resource definitions (CRDs).
The following settings are available for customization of ISGW services.
## Sample
```yaml
apiVersion: edgefs.rook.io/v1
kind: ISGW
metadata:
name: isgw01 # Inter-Segment Gateway service name
namespace: rook-edgefs
spec:
direction: "send+receive"
remoteURL: "ccow://192.168.1.43:14000"
#replicationType: "initial"
#metadataOnly: all
#dynamicFetchAddr: 0.0.0.0:49600
#localAddr: 0.0.0.0:10000
#useEncryptedTunnel: true
#chunkCacheSize: 1Gi
#config:
# server: "isgws"
# clients: ["isgwc1", "isgwc2"]
#placement:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: rook-edgefs-nodetype
# operator: In
# values:
# - isgw
# tolerations:
# - key: node230
# operator: Exists
# podAffinity:
# podAntiAffinity:
#resourceProfile: embedded
resources:
# limits:
# cpu: "2"
# memory: "4Gi"
# requests:
# cpu: "2"
# memory: "4Gi"
# A key/value list of annotations
annotations:
# key: value
```
## Metadata
* `name`: The name of the ISGW link service to create, which must match existing EdgeFS service. Provided CRD metadata can override existing EdgeFS service metadata.
* `namespace`: The namespace of the Rook cluster where the ISGW service is created.
* `direction`: I/O flow direction: `send`, `receive` or `send+receive` (default).
* `remoteURL`: I/O flow with destination pointing to the other ISGW endpoint service, locally mounted directory or other (non-EdgeFS) S3 compatible service. Format should be of form PROTOCOL://LOCATION, where PROTOCOL can be of "ccow", "file", "s3" and LOCATION depends on the PROTOCOL. In case of "ccow" LOCATION needs to specify a HOST:PORT of the other EdgeFS site, e.g. ccow://192.168.1.43:14000. In case of "file" LOCATION needs to be a path to a local POSIX directory, e.g. file://volumeDir. In cae of "s3" LOCATION can either point to an existing bucket, e.g. s3://mybucket.aws.com or to the other S3 compatible server IP:HOST, e.g. s3://214.4.34.22:4567. It is important to note that file:// and s3:// protocols only provided for easy integration with existing infrastructure.
* `replicationType`: Defines how tenant's buckets needs to be replicated. Can be specified as `initial`, `continuous` or `initial+continuous` (default). In case of `initial` replication type, ISGW service will only sync served buckets once with ability to manually trigger re-sync again. In case of `continuous` replication type, ISGW service will enable asynchronous syncing from the moment a bucket added to a served list of buckets, so that only recent changes will be synchronized, continuously. In case of `initial+continuous` replication type, ISGW service will first initiate syncing of all existing served buckets contents and once all is copied, it will automatically enable `continuous` mode of operation, guaranteeing that none of the source objects are skipped.
* `metadataOnly`: If set, then only immutable metadata changes will be transferred. This also enables on-demand data fetch and E-LRU cache capability. In case of metadata only transfers, dynamically fetched data will be cached at the accessing endpoints ISGW links locations. If an application would want to read an offset of a data which isn't found, global search request will be formed and distributed across all the connected ISGW bi-directional links serving source bucket. Missing data chunks will be found and fetched, delivered transparently to application. Can be set to either `all` or `versions`. Setting it to `versions` enables extremely fast replication (next second!) of data modifications.
* `dynamicFetchAddr`: Defines local cluster pod service host:port. Used by EdgeFS gateways (S3, S3X, NFS, SMB or iSCSI) to distribute missing chunk fetch requests. It needs to be set to other than 0.0.0.0 on access endpoints so to enable dynamic fetch feature. Default is 0.0.0.0:49678.
* `localAddr`: Defines local cluster pod service address and port. Used by ISGW link endpoint. Kubernetes ExternalIP will be automatically constructed if address is provided. Default is 0.0.0.0:14000.
* `useEncryptedTunnel`: If true, enables usage of encrypted SSH tunnel. By default, transferred metadata and data chunks are just compressed but unencrypted. Enable encryption if ISGW links crossing boundaries of single data center or multiple clouds.
* `chunkCacheSize`: Limit amount of memory allocated for dynamic chunk cache. By default ISGW pod uses up to 75% of available memory as chunk caching area. This option can influence this allocation strategy.
* `config`: Advanced ISGW services configurations - one kubernetes service per many EdgeFS services. `Server` is EdgeFS ISGW server service name, `Clients` array of ISGW client services names. When `config` option is defined the `remoteURL` is optional.
* `annotations`: Key value pair list of annotations to add.
* `placement`: The ISGW pods can be given standard Kubernetes placement restrictions with `nodeAffinity`, `tolerations`, `podAffinity`, and `podAntiAffinity` similar to placement defined for daemons configured by the [cluster CRD](/cluster/examples/kubernetes/edgefs/cluster.yaml).
* `resourceProfile`: ISGW pod resource utilization profile (Memory and CPU). Can be `embedded` or `performance` (default). In case of `performance` an ISGW pod trying to increase amount of internal I/O resources that results in higher performance at the cost of additional memory allocation and more CPU load. In `embedded` profile case, ISGW pod gives preference to preserving memory over I/O and limiting chunk cache (see `chunkCacheSize` option). The `performance` profile is the default unless cluster wide `embedded` option is defined.
* `resources`: Set resource requests/limits for the ISGW pods, see [Resource Requirements/Limits](edgefs-cluster-crd.md#resource-requirementslimits).
## Setting up two-sites bi-directional syncing EdgeFS namespace and tenants
This example will demonstrate creation of simple syncing namespace between two sites.
For more detailed instructions please refer to [EdgeFS Wiki](https://github.com/Nexenta/edgefs/wiki).
Below is an exampmle procedure to get things initialized and configured.
Before new local namespace (or local site) can be used, it has to be initialized with FlexHash and special purpose root object.
FlexHash consists of dynamically discovered configuration and checkpoint of accepted distribution table. FlexHash is responsible for I/O direction and plays important role in dynamic load balancing logic. It defines so-called Negotiating Groups (typically across zoned 8-24 disks) and final table distribution across all the participating components, e.g. data nodes, service gateways and tools.
Root object holds system information and table of namespaces registered to a local site. Root object is always local and never shared between the sites.
For each cluster, to initialize system and prepare logical definitions, login to the toolbox as shown in this example:
```console
kubectl get po --all-namespaces | grep edgefs-mgr
kubectl exec -it -n rook-edgefs rook-edgefs-mgr-6cb9598469-czr7p -- env COLUMNS=$COLUMNS LINES=$LINES TERM=linux toolbox
```
Assumption at this point is that nodes are all configured and can be seen via the following command:
```console
efscli system status
```
1. Initialize EdgeFS cluster:
Verify that HW (or better say emulated in this case) configuration look normal and accept it
```console
efscli system init
```
At this point new dynamically discovered configuration checkpoint will be created at `$NEDGE_HOME/var/run/flexhash-checkpoint.json`.
This will also create system "root" object, holding Site's Namespace. Namespace may consist of more then single region.
2. Create new local namespace (or we also call it "Region" or "Segment"):
```console
efscli cluster create Hawaii
```
3. Create logical tenants of cluster namespace "Hawaii", also buckets if needed:
```console
efscli tenant create Hawaii/Cola
efscli bucket create Hawaii/Cola/bk1
efscli tenant create Hawaii/Pepsi
efscli bucket create Hawaii/Pepsi/bk1
```
Now that Hawaii serving namespace cluster is setup, repeat steps on the secondary site:
```console
efscli cluster create Hawaii
efscli tenant create Hawaii/Cola -r 2
efscli tenant create Hawaii/Pepsi -r 2
```
This steps also includes a possibility to override destination defaults on per-tenant (Cola and Pepsi) basis.
In the example above we setting replication count to 2 on the secondary site.
4. Create ISGW link services on both EdgeFS sites:
Order of creation of ISGW links doesn't matter.
Link status change will be noticed automatically and syncing can be delayed for up to 7 days by default.
On the primary site:
```console
efscli service create isgw hawaii
efscli service serve hawaii Hawaii/Cola/bk1
efscli service serve hawaii Hawaii/Pepsi/bk1
```
Because we creating bi-directional link, on the secondary site we would need to create exactly same configuration except X-ISGW-Remote (remoteURL in CRD) where it should point back to primary. Synchronization is enabled on per-bucket level. Buckets which do not yet exist will be automatically created with tenant parameter overrides taken into an account.
5. Create ISGW Link CRDs on both EdgeFS sites:
```yaml
apiVersion: edgefs.rook.io/v1
kind: ISGW
metadata:
name: hawaii
namespace: rook-edgefs
spec:
direction: send+receive
remoteURL: ccow://10.3.32.240:14000
localAddr: 10.3.30.75:14000
```
```yaml
apiVersion: edgefs.rook.io/v1
kind: ISGW
metadata:
name: hawaii
namespace: rook-edgefs
spec:
direction: send+receive
remoteURL: ccow://10.3.30.75:14000
localAddr: 10.3.32.240:14000
```
It also maybe a bit easier to create services and CRDs using [EdgeFS UI Dashboard](edgefs-ui.md). ISGW Link page may look like this:
![EdgeFS ISGW Edit](media/edgefs-isgw-edit.png)
EdgeFS UI Dashboard automates the process of CRD composing but also has a capability to execute and monitor running Kubernetes Rook CRDs.
At this point two ISGW link services should be operational. Verify its operation with `show` command:
```console
efscli service show hawaii -s
```
-103
View File
@@ -1,103 +0,0 @@
---
title: Monitoring
weight: 4800
indent: true
---
{% include_relative branch.liquid %}
# EdgeFS Monitoring
[Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989)
Each Rook EdgeFS cluster has some built in metrics collectors/exporters for monitoring with [Prometheus](https://prometheus.io/).
If you do not have Prometheus running, follow the steps below to enable monitoring of Rook. If your cluster already
contains a Prometheus instance, it will automatically discover Rooks scrape endpoint using the standard
`prometheus.io/scrape` and `prometheus.io/port` annotations.
## Prometheus Operator
First the Prometheus operator needs to be started in the cluster so it can watch for our requests to start monitoring Rook and respond by deploying the correct Prometheus pods and configuration.
A full explanation can be found in the [Prometheus operator repository on GitHub](https://github.com/coreos/prometheus-operator), but the quick instructions can be found here:
```console
kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/v0.27.0/bundle.yaml
```
This will start the Prometheus operator, but before moving on, wait until the operator is in the `Running` state:
```console
kubectl get pod
```
Once the Prometheus operator is in the `Running` state, proceed to the next section.
## Prometheus Instances
With the Prometheus operator running, we can create a service monitor that will watch the Rook cluster and collect metrics regularly.
From the root of your locally cloned Rook repo, go the monitoring directory:
```console
git clone --single-branch --branch {{ branchName }} https://github.com/rook/rook.git
cd rook/cluster/examples/kubernetes/edgefs/monitoring
```
Create the service monitor as well as the Prometheus server pod and service:
```console
kubectl create -f service-monitor.yaml
kubectl create -f prometheus.yaml
kubectl create -f prometheus-service.yaml
```
Ensure that the Prometheus server pod gets created and advances to the `Running` state before moving on:
```console
kubectl -n rook-edgefs get pod prometheus-rook-prometheus-0
```
## Prometheus Web Console
Once the Prometheus server is running, you can open a web browser and go to the URL that is output from this command:
```console
echo "http://$(kubectl -n rook-edgefs -o jsonpath={.status.hostIP} get pod prometheus-rook-prometheus-0):30900"
```
You should now see the Prometheus monitoring website.
![Prometheus Monitoring Website](media/prometheus-monitor.png)
Click on `Graph` in the top navigation bar.
![Prometheus Add graph](media/prometheus-graph.png)
In the dropdown that says `insert metric at cursor`, select any metric you would like to see, for example `nedge_cluster_objects`.
Below the `Execute` button, ensure the `Graph` tab is selected and you should now see a graph of your chosen metric over time.
## Prometheus Consoles
A guide to how you can write your own Prometheus consoles can be found on the official Prometheus site here: [Prometheus.io Documentation - Console Templates](https://prometheus.io/docs/visualization/consoles/).
## Grafana Dashboards
For feedback on the dashboards please reach out to him on the [Rook.io Slack](https://slack.rook.io).
> **NOTE**: The dashboard only compatible with Grafana 5.0.3 or higher.
The following Grafana dashboard is available:
* [EdgeFS Cluster](https://grafana.com/dashboards/9683)
## Teardown
To clean up all the artifacts created by the monitoring walkthrough, copy/paste the entire block below (note that errors about resources "not found" can be ignored):
```console
kubectl delete -f service-monitor.yaml
kubectl delete -f prometheus.yaml
kubectl delete -f prometheus-service.yaml
kubectl delete -f https://raw.githubusercontent.com/coreos/prometheus-operator/v0.27.0/bundle.yaml
```
Then the rest of the instructions in the [Prometheus Operator docs](https://github.com/coreos/prometheus-operator#removal) can be followed to finish cleaning up.
-156
View File
@@ -1,156 +0,0 @@
---
title: Scale-Out NFS CRD
weight: 4300
indent: true
---
# EdgeFS Scale-Out NFS CRD
[Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989)
Rook allows creation and customization of EdgeFS NFS filesystems through the custom resource definitions (CRDs).
The following settings are available for customization of EdgeFS NFS services.
## Sample
```yaml
apiVersion: edgefs.rook.io/v1
kind: NFS
metadata:
name: nfs01
namespace: rook-edgefs
spec:
instances: 3
#relaxedDirUpdates: true
#chunkCacheSize: 1Gi
# A key/value list of annotations
annotations:
# key: value
placement:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: role
# operator: In
# values:
# - nfs-node
# tolerations:
# - key: nfs-node
# operator: Exists
# podAffinity:
# podAntiAffinity:
#resourceProfile: embedded
resources:
# limits:
# cpu: "500m"
# memory: "1024Mi"
# requests:
# cpu: "500m"
# memory: "1024Mi"
```
## Metadata
* `name`: The name of the NFS system to create, which must match existing EdgeFS service.
* `namespace`: The namespace of the Rook cluster where the NFS service is created.
* `instances`: The number of active NFS service instances. EdgeFS NFS service is Multi-Head capable, such so that multiple PODs can mount same tenant's buckets via different endpoints. [EdgeFS CSI provisioner](edgefs-csi.md) orchestrates distribution and load balancing across NFS service instances in round-robin or random policy ways.
* `relaxedDirUpdates`: If set to `true` then it will significantly improve performance of directory operations by deferring updates, guaranteeing eventual directory consistency. This option is recommended when a bucket exported via single NFS instance and it is not a destination for ISGW Link synchronization.
* `chunkCacheSize`: Limit amount of memory allocated for dynamic chunk cache. By default NFS pod uses up to 75% of available memory as chunk caching area. This option can influence this allocation strategy.
* `annotations`: Key value pair list of annotations to add.
* `placement`: The NFS PODs can be given standard Kubernetes placement restrictions with `nodeAffinity`, `tolerations`, `podAffinity`, and `podAntiAffinity` similar to placement defined for daemons configured by the [cluster CRD](/cluster/examples/kubernetes/edgefs/cluster.yaml).
* `resourceProfile`: NFS pod resource utilization profile (Memory and CPU). Can be `embedded` or `performance` (default). In case of `performance` an NFS pod trying to increase amount of internal I/O resources that results in higher performance at the cost of additional memory allocation and more CPU load. In `embedded` profile case, NFS pod gives preference to preserving memory over I/O and limiting chunk cache (see `chunkCacheSize` option). The `performance` profile is the default unless cluster wide `embedded` option is defined.
* `resources`: Set resource requests/limits for the NFS Pod(s), see [Resource Requirements/Limits](edgefs-cluster-crd.md#resource-requirementslimits).
## Setting up EdgeFS namespace and tenant
For more detailed instructions please refer to [EdgeFS Wiki](https://github.com/Nexenta/edgefs/wiki).
Below is an exampmle procedure to get things initialized and configured.
Before new local namespace (or local site) can be used, it has to be initialized with FlexHash and special purpose root object.
FlexHash consists of dynamically discovered configuration and checkpoint of accepted distribution table. FlexHash is responsible for I/O direction and plays important role in dynamic load balancing logic. It defines so-called Negotiating Groups (typically across zoned 8-24 disks) and final table distribution across all the participating components, e.g. data nodes, service gateways and tools.
Root object holds system information and table of namespaces registered to a local site. Root object is always local and never shared between the sites.
To initialize system and prepare logical definitions, login to the toolbox as shown in this example:
```console
kubectl get po --all-namespaces | grep edgefs-mgr
kubectl exec -it -n rook-edgefs rook-edgefs-mgr-6cb9598469-czr7p -- env COLUMNS=$COLUMNS LINES=$LINES TERM=linux toolbox
```
Assumption at this point is that nodes are all configured and can be seen via the following command:
```console
efscli system status
```
1. Initialize EdgeFS cluster:
Verify that HW (or better say emulated in this case) configuration look normal and accept it:
```console
efscli system init
```
At this point new dynamically discovered configuration checkpoint will be created at $NEDGE_HOME/var/run/flexhash-checkpoint.json
This will also create system "root" object, holding Site's Namespace. Namespace may consist of more then single region.
2. Create new local namespace (or we also call it "Region" or "Segment"):
```console
efscli cluster create Hawaii
```
3. Create logical tenants of cluster namespace "Hawaii", also buckets if needed:
```console
efscli tenant create Hawaii/Cola
efscli bucket create Hawaii/Cola/bk1
efscli tenant create Hawaii/Pepsi
efscli bucket create Hawaii/Pepsi/bk1
```
Now cluster is setup, services can be now created and attached to CSI provisioner.
4. Create NFS service objects for tenants:
> **NOTE**: Service names must contain only [lowercase alphanumeric characters or '-'](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names). Otherwise, corresponding EdgeFS NFS object names created in the next step will be invalid.
```console
efscli service create nfs nfs-cola
efscli service serve nfs-cola Hawaii/Cola/bk1
efscli service create nfs nfs-pepsi
efscli service serve nfs-pepsi Hawaii/Pepsi/bk1
```
5. Create your EdgeFS NFS objects:
```yaml
apiVersion: edgefs.rook.io/v1
kind: NFS
metadata:
name: nfs-cola
namespace: rook-edgefs
spec:
instances: 1
```
```yaml
apiVersion: edgefs.rook.io/v1
kind: NFS
metadata:
name: nfs-pepsi
namespace: rook-edgefs
spec:
instances: 1
```
At this point two NFS services should be available. Verify that showmount command can see service (substitute CLUSTERIP with corresponding entry from `kubectl get svc` command):
```console
kubectl get svc --all-namespaces
showmount -e CLUSTERIP
```
-129
View File
@@ -1,129 +0,0 @@
---
title: EdgeFS Data Fabric
weight: 550
indent: true
---
{% include_relative branch.liquid %}
# EdgeFS Data Fabric Quickstart
[Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989)
EdgeFS Data Fabric virtualzing common storage protocols and enables multi-cluster, multi-region data flow topologies.
This guide will walk you through the basic setup of a EdgeFS cluster namespaces and enable you to consume S3 object, NFS/SMB file access, and iSCSI block storage
from other pods running in your cluster, in decentralized ways.
## Minimum Version
EdgeFS operator, CSI plugin and CRDs were tested with Kubernetes **v1.13** or higher.
## Prerequisites
To make sure you have a Kubernetes cluster that is ready for `Rook`, you can [follow these instructions](k8s-pre-reqs.md).
A minimum of 3 storage devices are required with the default data replication count of 3. (To test EdgeFS on a single-node cluster with only one device or storage directory, set `sysRepCount` to `1` under the `rook-edgefs` `Cluster` object manifest in `cluster/examples/kubernetes/edgefs/cluster.yml`)
To operate efficiently EdgeFS requires 1 CPU core and 1GB of memory per storage device. Minimal memory requirement for EdgeFS target pod is 4GB. To get maximum out of SSD/NVMe device we recommend to double requirements to 2 CPU and 2GB per device.
If you are using `dataDirHostPath` to persist rook data on kubernetes hosts, make sure your host has at least 5GB of space available on the specified path.
We recommend you to configure EdgeFS to use of raw devices and equal distribution of available storage capacity.
> **IMPORTANT**: EdgeFS will automatically adjust deployment nodes to use larger then 128KB data chunks, with the following addition to /etc/sysctl.conf:
```ini
net.core.rmem_default = 80331648
net.core.rmem_max = 80331648
net.core.wmem_default = 33554432
net.core.wmem_max = 50331648
vm.dirty_ratio = 10
vm.dirty_background_ratio = 5
vm.swappiness = 15
```
To turn off this node adjustment need to enable `skipHostPrepare` option in cluster CRD [configuring the cluster](edgefs-cluster-crd.md).
## TL;DR
If you're feeling lucky, a simple EdgeFS Rook cluster can be created with the following kubectl commands. For the more detailed install, skip to the next section to [deploy the Rook operator](#deploy-the-rook-operator).
```console
git clone --single-branch --branch {{ branchName }} https://github.com/rook/rook.git
cd rook/cluster/examples/kubernetes/edgefs
kubectl create -f operator.yaml
kubectl create -f cluster.yaml
```
After the cluster is running, you can create [NFS, SMB, S3, or iSCSI](#storage) storage to be consumed by other applications in your cluster.
## Deploy the Rook Operator
The first step is to deploy the Rook system components, which include the Rook agent running on each node in your cluster as well as Rook operator pod.
Note that Google Cloud users need to explicitly grant user permission to create roles:
```console
kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user $(gcloud config get-value account)
```
Now you ready to create operator:
```console
cd cluster/examples/kubernetes/edgefs
kubectl create -f operator.yaml
# verify the rook-edgefs-operator, and rook-discover pods are in the `Running` state before proceeding
kubectl -n rook-edgefs-system get pod
```
## Create a Rook Cluster
Now that the Rook operator, and discover pods are running, we can create the Rook cluster. For the cluster to survive reboots,
make sure you set the `dataDirHostPath` property. For more settings, see the documentation on [configuring the cluster](edgefs-cluster-crd.md).
Edit the cluster spec in `cluster.yaml` file.
Create the cluster:
```console
kubectl create -f cluster.yaml
```
Use `kubectl` to list pods in the `rook-edgefs` namespace. You should be able to see the following pods once they are all running.
The number of target pods will depend on the number of nodes in the cluster and the number of devices and directories configured.
```console
$ kubectl -n rook-edgefs get pod
rook-edgefs rook-edgefs-mgr-7c76cb564d-56sxb 1/1 Running 0 24s
rook-edgefs rook-edgefs-target-0 3/3 Running 0 24s
rook-edgefs rook-edgefs-target-1 3/3 Running 0 24s
rook-edgefs rook-edgefs-target-2 3/3 Running 0 24s
```
Notice that EdgeFS Targets are running as StatefulSet.
## Storage
For a walkthrough of the types of Storage CRDs exposed by EdgeFS Rook, see the guides for:
* **[NFS Server](edgefs-nfs-crd.md)**: Create Scale-Out NFS storage to be consumed by multiple pods, simultaneously
* **[SMB Server](edgefs-smb-crd.md)**: Create Scale-Out Microsoft CIFS/SMB storage to be consumed by multiple pods, simultaneously
* **[S3X](edgefs-s3x-crd.md)**: Create an Extended S3 HTTP/2 compatible object and key-value store that is accessible inside or outside the Kubernetes cluster
* **[AWS S3](edgefs-s3-crd.md)**: Create an AWS S3 compatible object store that is accessible inside or outside the Kubernetes cluster
* **[iSCSI Target](edgefs-iscsi-crd.md)**: Create low-latency and high-throughput iSCSI block to be consumed by a pod
## CSI Integration
EdgeFS comes with built-in gRPC management services, which are tightly integrated into Kubernetes provisioning and attaching CSI framework. Please see the [EdgeFS CSI](edgefs-csi.md) for setup and usage information.
## EdgeFS Dashboard and Monitoring
Each Rook cluster has some built in metrics collectors/exporters for monitoring with [Prometheus](https://prometheus.io/).
In additional to classic monitoring parameters, it has a built-in multi-tenancy, multi-service capability. For instance, you can quickly discover most loaded tenants, buckets or services.
To learn how to set up monitoring for your Rook cluster, you can follow the steps in the [monitoring guide](./edgefs-monitoring.md).
## Teardown
When you are done with the cluster, simply delete CRDs in reverse order. You may want to re-format your raw disks with `wipefs -a` command. Or if you using raw devices and want to keep same storage configuration but change some resource or networking parameters, consider to use `devicesResurrectMode`.
-159
View File
@@ -1,159 +0,0 @@
---
title: AWS S3 CRD
weight: 4500
indent: true
---
# EdgeFS AWS S3 CRD
[Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989)
Rook allows creation and customization of AWS S3 compatible services through the custom resource definitions (CRDs).
The following settings are available for customization of S3 services.
## Sample
```yaml
apiVersion: edgefs.rook.io/v1
kind: S3
metadata:
name: s301
namespace: rook-edgefs
spec:
instances: 3
#s3type: s3s
#chunkCacheSize: 1Gi
# A key/value list of annotations
annotations:
# key: value
placement:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: role
# operator: In
# values:
# - s3-node
# tolerations:
# - key: s3-node
# operator: Exists
# podAffinity:
# podAntiAffinity:
#resourceProfile: embedded
resources:
# limits:
# cpu: "500m"
# memory: "1024Mi"
# requests:
# cpu: "500m"
# memory: "1024Mi"
```
## Metadata
* `name`: The name of the S3 system to create, which must match existing EdgeFS service.
* `namespace`: The namespace of the Rook cluster where the S3 service is created.
* `s3type`: The type of S3 service to be created. It can be one of the following: `s3` (default, path style) or `s3s` (buckets as DNS style)
* `sslCertificateRef`: If the certificate is not specified, SSL will use default crt and key files. If specified, this is the name of the Kubernetes secret that contains the SSL certificate to be used for secure connections. Please see [secret YAML file example](/cluster/examples/kubernetes/edgefs/sslKeyCertificate.yaml) on how to setup Kuberenetes secret. Notice that base64 encoding is required.
* `port`: The port on which the S3 pods and the S3 service will be listening (not encrypted). Default port is 9982 for `s3` and 9983 for `s3s`.
* `securePort`: The secure port on which S3 pods will be listening. If not defined then default SSL certificates will be used. Default port is 8443 for `s3` and 8444 for `s3s`.
* `chunkCacheSize`: Limit amount of memory allocated for dynamic chunk cache. By default S3 pod uses up to 75% of available memory as chunk caching area. This option can influence this allocation strategy.
* `instances`: The number of active S3 service instances. For load balancing we recommend to use nginx and the like solutions.
* `annotations`: Key value pair list of annotations to add.
* `placement`: The S3 pods can be given standard Kubernetes placement restrictions with `nodeAffinity`, `tolerations`, `podAffinity`, and `podAntiAffinity` similar to placement defined for daemons configured by the [cluster CRD](/cluster/examples/kubernetes/edgefs/cluster.yaml).
* `resourceProfile`: S3 pod resource utilization profile (Memory and CPU). Can be `embedded` or `performance` (default). In case of `performance` an S3 pod trying to increase amount of internal I/O resources that results in higher performance at the cost of additional memory allocation and more CPU load. In `embedded` profile case, S3 pod gives preference to preserving memory over I/O and limiting chunk cache (see `chunkCacheSize` option). The `performance` profile is the default unless cluster wide `embedded` option is defined.
* `resources`: Set resource requests/limits for the S3 pods, see [Resource Requirements/Limits](edgefs-cluster-crd.md#resource-requirementslimits).
## Setting up EdgeFS namespace and tenant
For more detailed instructions please refer to [EdgeFS Wiki](https://github.com/Nexenta/edgefs/wiki).
Below is an exampmle procedure to get things initialized and configured.
Before new local namespace (or local site) can be used, it has to be initialized with FlexHash and special purpose root object.
FlexHash consists of dynamically discovered configuration and checkpoint of accepted distribution table. FlexHash is responsible for I/O direction and plays important role in dynamic load balancing logic. It defines so-called Negotiating Groups (typically across zoned 8-24 disks) and final table distribution across all the participating components, e.g. data nodes, service gateways and tools.
Root object holds system information and table of namespaces registered to a local site. Root object is always local and never shared between the sites.
To initialize system and prepare logical definitions, login to the toolbox as shown in this example:
```console
kubectl get po --all-namespaces | grep edgefs-mgr
kubectl exec -it -n rook-edgefs rook-edgefs-mgr-6cb9597469-czr7p -- env COLUMNS=$COLUMNS LINES=$LINES TERM=linux toolbox
```
Assumption at this point is that nodes are all configured and can be seen via the following command:
```console
efscli system status
```
1. Initialize EdgeFS cluster:
Verify that HW (or better say emulated in this case) configuration look normal and accept it
```console
efscli system init
```
At this point new dynamically discovered configuration checkpoint will be created at $NEDGE_HOME/var/run/flexhash-checkpoint.json
This will also create system "root" object, holding Site's Namespace. Namespace may consist of more then single region.
2. Create new local namespace (or we also call it "Region" or "Segment"):
```console
efscli cluster create Hawaii
```
3. Create logical tenants of cluster namespace "Hawaii", also buckets if needed:
```console
efscli tenant create Hawaii/Cola
efscli bucket create Hawaii/Cola/bk1
efscli tenant create Hawaii/Pepsi
efscli bucket create Hawaii/Pepsi/bk1
```
Now cluster is setup, services can be now created.
4. Create S3 services objects for tenants:
```console
efscli service create s3 s3-cola
efscli service serve s3-cola Hawaii/Cola
efscli service create s3 s3-pepsi
efscli service serve s3-pepsi Hawaii/Pepsi
```
In case of s3type set to `s3`, do not forget to configure default domain name:
```console
efscli service config s3-cola X-Domain cola.com
efscli service config s3-pepsi X-Domain pepsi.com
```
5. Create EdgeFS S3 objects:
```yaml
apiVersion: edgefs.rook.io/v1
kind: S3
metadata:
name: s3-cola
namespace: rook-edgefs
spec:
instances: 1
```
```yaml
apiVersion: edgefs.rook.io/v1
kind: S3
metadata:
name: s3-pepsi
namespace: rook-edgefs
spec:
instances: 1
```
At this point two S3 services should be available and listening on default ports.
-154
View File
@@ -1,154 +0,0 @@
---
title: Edge-X S3 CRD
weight: 4400
indent: true
---
# Edge-X S3 CRD
[Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989)
The API provides access to advanced EdgeFS Object interfaces, such as access to Key-Value store, S3 Object Append mode, S3 Object RW mode and S3 Object Stream Session (POSIX compatible) mode. A Stream Session encompasses a series of edits to one object made by one source that are saved as one or more versions during a specific finite time duration. A Stream Session must be isolated while it is open. That is, users working through this session will not see updates to this object from other sessions.Stream Session allows high-performance POSIX-style access to an object and thus it is beneficial for client applications to use HTTP/1.1 Persistent Connection extensions, to minimize latency between updates or reads.
For more detailes on API please refer to [Edge-S3 API](https://edgex.docs.apiary.io/).
Rook allows creation and customization of Edge-X S3 services through the custom resource definitions (CRDs).
The following settings are available for customization of Edge-S3 services.
## Sample
```yaml
apiVersion: edgefs.rook.io/v1
kind: S3X
metadata:
name: s3x01
namespace: rook-edgefs
spec:
instances: 3
#chunkCacheSize: 1Gi
# A key/value list of annotations
annotations:
# key: value
placement:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: role
# operator: In
# values:
# - s3x-node
# tolerations:
# - key: s3x-node
# operator: Exists
# podAffinity:
# podAntiAffinity:
#resourceProfile: embedded
resources:
# limits:
# cpu: "500m"
# memory: "1024Mi"
# requests:
# cpu: "500m"
# memory: "1024Mi"
```
## Metadata
* `name`: The name of the Edge-X S3 system to create, which must match existing EdgeFS service.
* `namespace`: The namespace of the Rook cluster where the Edge-X S3 service is created.
* `sslCertificateRef`: If the certificate is not specified, SSL will use default crt and key files. If specified, this is the name of the Kubernetes secret that contains the SSL certificate to be used for secure connections. Please see [secret YAML file example](/cluster/examples/kubernetes/edgefs/sslKeyCertificate.yaml) on how to setup Kuberenetes secret. Notice that base64 encoding is required.
* `port`: The port on which the Edge-X S3 pods and the Edge-X S3 service will be listening (not encrypted). Default port is 3000.
* `securePort`: The secure port on which Edge-X S3 pods will be listening. If not defined then default SSL certificates will be used. Default port is 3001.
* `instances`: The number of active Edge-X S3 service instances. For load balancing we recommend to use nginx and the like solutions.
* `chunkCacheSize`: Limit amount of memory allocated for dynamic chunk cache. By default S3X pod uses up to 75% of available memory as chunk caching area. This option can influence this allocation strategy.
* `annotations`: Key value pair list of annotations to add.
* `placement`: The Edge-X S3 PODs can be given standard Kubernetes placement restrictions with `nodeAffinity`, `tolerations`, `podAffinity`, and `podAntiAffinity` similar to placement defined for daemons configured by the [cluster CRD](/cluster/examples/kubernetes/edgefs/cluster.yaml).
* `resourceProfile`: S3X pod resource utilization profile (Memory and CPU). Can be `embedded` or `performance` (default). In case of `performance` an S3X pod trying to increase amount of internal I/O resources that results in higher performance at the cost of additional memory allocation and more CPU load. In `embedded` profile case, S3X pod gives preference to preserving memory over I/O and limiting chunk cache (see `chunkCacheSize` option). The `performance` profile is the default unless cluster wide `embedded` option is defined.
* `resources`: Set resource requests/limits for the Edge-X S3 Pod(s), see [Resource Requirements/Limits](edgefs-cluster-crd.md#resource-requirementslimits).
## Setting up EdgeFS namespace and tenant
For more detailed instructions please refer to [EdgeFS Wiki](https://github.com/Nexenta/edgefs/wiki).
Below is an exampmle procedure to get things initialized and configured.
Before new local namespace (or local site) can be used, it has to be initialized with FlexHash and special purpose root object.
FlexHash consists of dynamically discovered configuration and checkpoint of accepted distribution table. FlexHash is responsible for I/O direction and plays important role in dynamic load balancing logic. It defines so-called Negotiating Groups (typically across zoned 8-24 disks) and final table distribution across all the participating components, e.g. data nodes, service gateways and tools.
Root object holds system information and table of namespaces registered to a local site. Root object is always local and never shared between the sites.
To initialize system and prepare logical definitions, login to the toolbox as shown in this example:
```console
kubectl get po --all-namespaces | grep edgefs-mgr
kubectl exec -it -n rook-edgefs rook-edgefs-mgr-6cb9598469-czr7p -- env COLUMNS=$COLUMNS LINES=$LINES TERM=linux toolbox
```
Assumption at this point is that nodes are all configured and can be seen via the following command:
```console
efscli system status
```
1. Initialize EdgeFS cluster:
Verify that HW (or better say emulated in this case) configuration look normal and accept it
```console
efscli system init
```
At this point new dynamically discovered configuration checkpoint will be created at $NEDGE_HOME/var/run/flexhash-checkpoint.json
This will also create system "root" object, holding Site's Namespace. Namespace may consist of more then single region.
2. Create new local namespace (or we also call it "Region" or "Segment"):
```console
efscli cluster create Hawaii
```
3. Create logical tenants of cluster namespace "Hawaii", also buckets if needed:
```console
efscli tenant create Hawaii/Cola
efscli bucket create Hawaii/Cola/bk1
efscli tenant create Hawaii/Pepsi
efscli bucket create Hawaii/Pepsi/bk1
```
Now cluster is setup, services can be now created.
4. Create Edge-X S3 services objects for tenants:
```console
efscli service create s3x s3x-cola
efscli service serve s3x-cola Hawaii/Cola
efscli service create s3x s3x-pepsi
efscli service serve s3x-pepsi Hawaii/Pepsi
```
5. Create EdgeFS S3X CRDs:
```yaml
apiVersion: edgefs.rook.io/v1
kind: S3X
metadata:
name: s3x-cola
namespace: rook-edgefs
spec:
instances: 1
```
```yaml
apiVersion: edgefs.rook.io/v1
kind: S3X
metadata:
name: s3x-pepsi
namespace: rook-edgefs
spec:
instances: 1
```
At this point two Edge-X S3 services should be available and listening on default ports.
-192
View File
@@ -1,192 +0,0 @@
---
title: Scale-Out SMB CRD
weight: 4350
indent: true
---
# EdgeFS Scale-Out SMB CRD
[Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989)
Rook allows creation and customization of EdgeFS SMB/CIFS filesystems through the custom resource definitions (CRDs).
The following settings are available for customization of EdgeFS SMB services.
## Sample
```yaml
apiVersion: edgefs.rook.io/v1
kind: SMB
metadata:
name: smb01
namespace: rook-edgefs
spec:
instances: 3
#ads:
# domainName: "corp.example.com"
# dcName: "localdc"
# serverName: "edgefs-smb"
# userSecret: "corp.example.com"
# nameservers: "10.200.1.19"
#relaxedDirUpdates: true
#chunkCacheSize: 1Gi
# A key/value list of annotations
annotations:
# key: value
placement:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: role
# operator: In
# values:
# - smb-node
# tolerations:
# - key: smb-node
# operator: Exists
# podAffinity:
# podAntiAffinity:
#resourceProfile: embedded
resources:
# limits:
# cpu: "500m"
# memory: "1024Mi"
# requests:
# cpu: "500m"
# memory: "1024Mi"
```
## Metadata
* `name`: The name of the SMB system to create, which must match existing EdgeFS service.
* `namespace`: The namespace of the Rook cluster where the SMB service is created.
* `instances`: The number of active SMB service instances. EdgeFS SMB service is Multi-Head capable, such so that multiple PODs can mount same tenant's buckets via different endpoints.
* `relaxedDirUpdates`: If set to `true` then it will significantly improve performance of directory operations by deferring updates, guaranteeing eventual directory consistency. This option is recommended when a bucket exported via single SMB instance and it is not a destination for ISGW Link synchronization.
* `chunkCacheSize`: Limit amount of memory allocated for dynamic chunk cache. By default SMB pod uses up to 75% of available memory as chunk caching area. This option can influence this allocation strategy.
* `annotations`: Key value pair list of annotations to add.
* `placement`: The SMB PODs can be given standard Kubernetes placement restrictions with `nodeAffinity`, `tolerations`, `podAffinity`, and `podAntiAffinity` similar to placement defined for daemons configured by the [cluster CRD](/cluster/examples/kubernetes/edgefs/cluster.yaml).
* `resourceProfile`: SMB pod resource utilization profile (Memory and CPU). Can be `embedded` or `performance` (default). In case of `performance` an SMB pod trying to increase amount of internal I/O resources that results in higher performance at the cost of additional memory allocation and more CPU load. In `embedded` profile case, SMB pod gives preference to preserving memory over I/O and limiting chunk cache (see `chunkCacheSize` option). The `performance` profile is the default unless cluster wide `embedded` option is defined.
* `resources`: Set resource requests/limits for the SMB Pod(s), see [Resource Requirements/Limits](edgefs-cluster-crd.md#resource-requirementslimits).
* `ads`: Set Active Directory service join parameters. If not defined, SMB gateway will start in WORKGROUP mode.
## Joining Windows Active Directory service
Before you begin, please make sure that external IP can be properly provisioned to passthrough ports 445 (smb) and 139 (netbios), pointing to SMB service.
If for some reason external IP is difficult or impossible to provision, you can use NodePort and setup redirect rules on the node where SMB gateway will be running.
Define "ads" metadata section with the following parameters and reference a secret object:
* `domainName`: AD Domain Name in form of DNS record, like `corp.example.com`.
* `dcName`: Preferred Domain Controller Name. Could be short name like `localdc`.
* `serverName`: NetBIOS Name of our SMB Gateway. This name will be used to during SMB share mapping, e.g. `\\edgefs-smb\bk1`.
* `userSecret`: The name of secret holding username and password keys. Secret object has to be pre-created in the same namespace.
* `nameservers`: The comma separated list of DNS name server IPs, e.g. `10.3.40.16,10.3.40.17`
Secret object can look like this:
```yaml
apiVersion: v1
kind: Secret
metadata:
name: corp.example.com
namespace: rook-edgefs
type: Opaque
stringData:
username: "Administrator"
password: "Password!"
```
## Setting up EdgeFS namespace and tenant
For more detailed instructions please refer to [EdgeFS Wiki](https://github.com/Nexenta/edgefs/wiki).
Below is an exampmle procedure to get things initialized and configured.
Before new local namespace (or local site) can be used, it has to be initialized with FlexHash and special purpose root object.
FlexHash consists of dynamically discovered configuration and checkpoint of accepted distribution table. FlexHash is responsible for I/O direction and plays important role in dynamic load balancing logic. It defines so-called Negotiating Groups (typically across zoned 8-24 disks) and final table distribution across all the participating components, e.g. data nodes, service gateways and tools.
Root object holds system information and table of namespaces registered to a local site. Root object is always local and never shared between the sites.
To initialize system and prepare logical definitions, login to the toolbox as shown in this example:
```console
kubectl get po --all-namespaces | grep edgefs-mgr
kubectl exec -it -n rook-edgefs rook-edgefs-mgr-6cb9598469-czr7p -- env COLUMNS=$COLUMNS LINES=$LINES TERM=linux toolbox
```
Assumption at this point is that nodes are all configured and can be seen via the following command:
```console
efscli system status
```
1. Initialize EdgeFS cluster:
Verify that HW (or better say emulated in this case) configuration look normal and accept it:
```console
efscli system init
```
At this point new dynamically discovered configuration checkpoint will be created at $NEDGE_HOME/var/run/flexhash-checkpoint.json
This will also create system "root" object, holding Site's Namespace. Namespace may consist of more then single region.
2. Create new local namespace (or we also call it "Region" or "Segment"):
```console
efscli cluster create Hawaii
```
3. Create logical tenants of cluster namespace "Hawaii", also buckets if needed:
```console
efscli tenant create Hawaii/Cola
efscli bucket create Hawaii/Cola/bk1
efscli tenant create Hawaii/Pepsi
efscli bucket create Hawaii/Pepsi/bk1
```
Now cluster is setup, services can be now created and attached to CSI provisioner.
4. Create SMB service objects for tenants:
```console
efscli service create smb smb-cola
efscli service serve smb-cola Hawaii/Cola/bk1
efscli service config smb-cola X-SMB-OPTS-Cola-bk1 "force user = root;public = yes;directory mask = 777;create mask = 666"
efscli service create smb smb-pepsi
efscli service serve smb-pepsi Hawaii/Pepsi/bk1
efscli service config smb-pepsi X-SMB-OPTS-Pepsi-bk1 "force user = root;public = yes;directory mask = 777;create mask = 666"
```
Also, notice that we setting password-less configuration for bk1 share.
5. Create your EdgeFS SMB objects:
```yaml
apiVersion: edgefs.rook.io/v1
kind: SMB
metadata:
name: smb-cola
namespace: rook-edgefs
spec:
instances: 1
```
```yaml
apiVersion: edgefs.rook.io/v1
kind: SMB
metadata:
name: smb-pepsi
namespace: rook-edgefs
spec:
instances: 1
```
At this point two SMB services should be available. Install cifs-utils package and verify that you can mount it (substitute CLUSTERIP with corresponding entry from `kubectl get svc` command):
```console
kubectl get -o rook-edgefs svc | grep smb-pepsi
mount -t cifs -o vers=3.0,sec=none //CLUSTERIP/bk1 /tmp/bk1
```
-39
View File
@@ -1,39 +0,0 @@
---
title: EdgeFS Data Fabric
weight: 4000
---
# EdgeFS Data Fabric
[Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989)
[EdgeFS](http://edgefs.io) is high-performance and fault-tolerant decentralized data fabric with virtualized access to S3 object, NFS/SMB file, NoSQL and iSCSI block.
EdgeFS is capable of spanning unlimited number of geographically distributed sites (Geo-site), connected with each other as one global name space data fabric running on top of Kubernetes platform, providing persistent, fault-tolerant and high-performance volumes for stateful Kubernetes Applications.
At each Geo-site, EdgeFS nodes deployed as containers (StatefulSet) on physical or virtual Kubernetes nodes, pooling available storage capacity and presenting it via compatible S3/NFS/SMB/iSCSI/etc storage emulated protocols for cloud-native applications running on the same or dedicated servers.
## How it works, in a Nutshell?
If you familiar with "git", where all modifications are fully versioned and globally immutable, it is highly likely you already know how it works at its core. Think of it as a world-scale copy-on-write technique. Now, if we can make a parallel for you to understand it better - what EdgeFS does, it expands "git" paradigm to object storage and making Kubernetes Persistent Volumes accessible via emulated storage standard protocols e.g. S3, NFS, SMB and even block devices such as iSCSI, in a high-performance and low-latency ways. With fully versioned modifications, fully immutable metadata and data, users data can be transparently replicated, distributed and dynamically pre-fetched across many Geo-sites.
## Design
Rook enables easy deployment of EdgeFS Geo-sites on Kubernetes using Kubernetes primitives.
![EdgeFS Rook Architecture on Kubernetes](media/edgefs-rook.png)
With Rook running in the Kubernetes cluster, Kubernetes PODs or External applications can
mount block devices and filesystems managed by Rook, or can use the S3/S3X API for object storage. The Rook operator
automates configuration of storage components and monitors the cluster to ensure the storage remains available
and healthy.
The Rook operator is a simple container that has all that is needed to bootstrap and monitor the storage cluster. The operator will start and monitor StatefulSet storage Targets, gRPC manager and Prometheus Multi-Tenant Dashboard. All the attached devices (or directories) will provide pooled storage site. Storage sites then can be easily connected with each other as one global name space data fabric. The operator manages CRDs for Targets, Scale-out NFS/SMB, Object stores (S3/S3X), and iSCSI volumes by initializing the pods and other artifacts necessary to
run the services.
The operator will monitor the storage Targets to ensure the cluster is healthy. EdgeFS will dynamically handle services failover, and other adjustments that maybe made as the cluster grows or shrinks.
The EdgeFS Rook operator also comes with tightly integrated CSI plugin. CSI pods deployed on every Kubernetes node. All storage operations required on the node are handled such as attaching network storage devices, mounting NFS exports, and dynamic provisioning.
Rook is implemented in golang. EdgeFS is implemented in Go/C where the data path is highly optimized.
Learn more at [edgefs.io](http://edgefs.io).
-150
View File
@@ -1,150 +0,0 @@
---
title: OpenStack/SWIFT CRD
weight: 4550
indent: true
---
# EdgeFS OpenStack/SWIFT CRD
[Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989)
Rook allows creation and customization of OpenStack/SWIFT compatible services through the custom resource definitions (CRDs).
The following settings are available for customization of SWIFT services.
## Sample
```yaml
apiVersion: edgefs.rook.io/v1
kind: SWIFT
metadata:
name: swift01
namespace: rook-edgefs
spec:
instances: 3
#chunkCacheSize: 1Gi
# A key/value list of annotations
annotations:
# key: value
placement:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: role
# operator: In
# values:
# - swift-node
# tolerations:
# - key: swift-node
# operator: Exists
# podAffinity:
# podAntiAffinity:
#resourceProfile: embedded
resources:
# limits:
# cpu: "500m"
# memory: "1024Mi"
# requests:
# cpu: "500m"
# memory: "1024Mi"
```
## Metadata
* `name`: The name of the SWIFT service to create, which must match existing EdgeFS service.
* `namespace`: The namespace of the Rook cluster where the SWIFT service is created.
* `sslCertificateRef`: If the certificate is not specified, SSL will use default crt and key files. If specified, this is the name of the Kubernetes secret that contains the SSL certificate to be used for secure connections. Please see [secret YAML file example](/cluster/examples/kubernetes/edgefs/sslKeyCertificate.yaml) on how to setup Kuberenetes secret. Notice that base64 encoding is required.
* `port`: The port on which the SWIFT pods and the SWIFT service will be listening (not encrypted). Default port is 9981.
* `securePort`: The secure port on which SWIFT pods will be listening. If not defined then default SSL certificates will be used. Default port is 443.
* `instances`: The number of active SWIFT service instances. For load balancing we recommend to use nginx and the like solutions.
* `chunkCacheSize`: Limit amount of memory allocated for dynamic chunk cache. By default SWIFT pod uses up to 75% of available memory as chunk caching area. This option can influence this allocation strategy.
* `annotations`: Key value pair list of annotations to add.
* `placement`: The SWIFT pods can be given standard Kubernetes placement restrictions with `nodeAffinity`, `tolerations`, `podAffinity`, and `podAntiAffinity` similar to placement defined for daemons configured by the [cluster CRD](/cluster/examples/kubernetes/edgefs/cluster.yaml).
* `resourceProfile`: SWIFT pod resource utilization profile (Memory and CPU). Can be `embedded` or `performance` (default). In case of `performance` an SWIFT pod trying to increase amount of internal I/O resources that results in higher performance at the cost of additional memory allocation and more CPU load. In `embedded` profile case, SWIFT pod gives preference to preserving memory over I/O and limiting chunk cache (see `chunkCacheSize` option). The `performance` profile is the default unless cluster wide `embedded` option is defined.
* `resources`: Set resource requests/limits for the SWIFT pods, see [Resource Requirements/Limits](edgefs-cluster-crd.md#resource-requirementslimits).
## Setting up EdgeFS namespace and tenant
For more detailed instructions please refer to [EdgeFS Wiki](https://github.com/Nexenta/edgefs/wiki).
Below is an exampmle procedure to get things initialized and configured.
Before new local namespace (or local site) can be used, it has to be initialized with FlexHash and special purpose root object.
FlexHash consists of dynamically discovered configuration and checkpoint of accepted distribution table. FlexHash is responsible for I/O direction and plays important role in dynamic load balancing logic. It defines so-called Negotiating Groups (typically across zoned 8-24 disks) and final table distribution across all the participating components, e.g. data nodes, service gateways and tools.
Root object holds system information and table of namespaces registered to a local site. Root object is always local and never shared between the sites.
To initialize system and prepare logical definitions, login to the toolbox as shown in this example:
```console
kubectl get po --all-namespaces | grep edgefs-mgr
kubectl exec -it -n rook-edgefs rook-edgefs-mgr-6cb9598469-czr7p -- env COLUMNS=$COLUMNS LINES=$LINES TERM=linux toolbox
```
Assumption at this point is that nodes are all configured and can be seen via the following command:
```console
efscli system status
```
1. Initialize EdgeFS cluster:
Verify that HW (or better say emulated in this case) configuration look normal and accept it
```console
efscli system init
```
At this point new dynamically discovered configuration checkpoint will be created at $NEDGE_HOME/var/run/flexhash-checkpoint.json
This will also create system "root" object, holding Site's Namespace. Namespace may consist of more then single region.
2. Create new local namespace (or we also call it "Region" or "Segment"):
```console
efscli cluster create Hawaii
```
3. Create logical tenants of cluster namespace "Hawaii", also buckets if needed:
```
efscli tenant create Hawaii/Cola
efscli bucket create Hawaii/Cola/bk1
efscli tenant create Hawaii/Pepsi
efscli bucket create Hawaii/Pepsi/bk1
```
Now cluster is setup, services can be now created.
4. Create SWIFT services objects for tenants:
```console
efscli service create swift swift-cola
efscli service serve swift-cola Hawaii
efscli service create swift swiftPepsi
efscli service serve swift-pepsi Hawaii
```
5. Create EdgeFS SWIFT objects:
```yaml
apiVersion: edgefs.rook.io/v1
kind: SWIFT
metadata:
name: swiftCola
namespace: rook-edgefs
spec:
instances: 1
```
```yaml
apiVersion: edgefs.rook.io/v1
kind: SWIFT
metadata:
name: swiftPepsi
namespace: rook-edgefs
spec:
instances: 1
```
At this point two SWIFT services should be available and listening on default ports.
-50
View File
@@ -1,50 +0,0 @@
---
title: User Interface
weight: 4900
indent: true
---
# EdgeFS Dashboard and User Interface
[Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989)
EdgeFS comes with built-in local cluster Dashboard and User Interface.
The dashboard is a very helpful tool to give you an overview of the status of your cluster, including overall health,
status of the corosync quorum, status of the VDEVs, and other EdgeFS services.
![EdgeFS UI Dashboard](media/edgefs-ui-dashboard.png)
Rook EdgeFS Operator enables the dashboard by default.
A K8s service will be created to expose HTTP/S ports inside the cluster.
This example shows what ports was configured for EdgeFS right after successful cluster deployment:
```console
# kubectl get svc -n rook-edgefs
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
rook-edgefs-restapi NodePort 10.105.177.93 <none> 8881:32135/TCP,8080:31363/TCP,4443:31485/TCP 3h14m
rook-edgefs-ui NodePort 10.97.70.209 <none> 3000:32048/TCP,3443:30273/TCP 3h14m
rook-edgefs-mgr NodePort 10.108.199.1 <none> 6789:31370/TCP 3h14m
```
The `rook-edgefs-restapi` service is used for the [Prometheus metrics](edgefs-monitoring.md) scrape and REST API endpoints.
REST API endpoint is used by Console and Graphical UIs. It exposing ClusterIPs with HTTP ports 8080 and 4443(SSL). NodePort(s) for external access automatically pre-created.
The `rook-edgefs-ui` service is used to expose browser based User Interface ports.
Using NodePort you will be able to connect to the dashboard by direct node IP and provided port number, in this example at `http://NODEIP:32048`.
The `rook-edgefs-mgr` service is for gRPC communication between the [EdgeFS CSI Provisioner](edgefs-csi.md), REST API and services. It exposes cluster internal port 6789.
## Dynamic EdgeFS Service CRD editing
One of the very useful features of EdgeFS Dashboard is Dynamic Service CRD editing UI. Ability to edit CRDs via intuitive graphical interface can simplify on-going EdgeFS cluster management drastically. For instance, below picture demonstrates how NFS CRD service can be dynamically edited, exports can be added or removed:
![EdgeFS UI NFS Editing](media/edgefs-ui-nfs-edit.png)
EdgeFS UI renders user requests and sends them to the REST API where service CRD is constructed, validated and executed. Certain parameters can only be updated within a cluster service definition itself, and as such this UI blends the two, thus providing simplified management functionality.
### Credentials
After you connect to the dashboard you will need to login for secure access. Rook EdgeFS operator creates a default user named
`admin` and password `edgefs`. It can be changed later via `neadm system passwd` command executed within `mgr` pod.
-156
View File
@@ -1,156 +0,0 @@
---
title: Upgrade
weight: 4920
indent: true
---
# EdgeFS Upgrades
[Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989)
This guide will walk you through the manual steps to upgrade the software in a Rook EdgeFS cluster
from one version to the next. Rook EdgeFS is a multi-cloud distributed software system and
therefore there are multiple components to individually upgrade in the sequence defined in this
guide. After each component is upgraded, it is important to verify that the cluster returns to a
healthy and fully functional state.
We welcome feedback and opening issues!
## Supported Versions
The supported version for this upgrade guide is **from a 1.0 release to a 1.x releases**.
Build-to-build upgrades are not guaranteed to work. This guide is to perform upgrades only between
the official releases.
Upgrades from Alpha to Beta not supported. However, please see migration procedure below.
## EdgeFS Migration
EdgeFS Operator provides a way of preserving data on disks or directories while moving to a
new version (like Alpha to Beta transitioning) or reconfiguring (like full re-start).
We will do all our work in the EdgeFS example manifests directory.
```console
cd $YOUR_ROOK_REPO/cluster/examples/kubernetes/edgefs/
```
Example of migration from existing `v1beta1` EdgeFS cluster to stable `v1` EdgeFS cluster:
For already existing EdgeFS manifests we should replace `v1beta1` version to `v1`.
We can use a few simple `sed` commands to do this for all manifests at once.
```console
sed -i.bak -e "s/edgefs.rook.io\/v1beta1/edgefs.rook.io\/v1beta1/g" *.yaml
sed -i -e "s/edgefs.rook.io\/v1beta1/edgefs.rook.io\/v1/g" *.yaml
mkdir -p backups
mv *.bak backups/
```
Then we should add new `v1` version specification to existing EdgeFS' CRDs.
```console
kubectl apply -f upgrade-from-v1beta1-create.yaml
```
And replace EdgeFS operator to new stable 'v1' version
```console
kubectl -n rook-edgefs-system set image deploy/rook-edgefs-operator rook-edgefs-operator=rook/edgefs:v1.1.0
```
Then you could update your cluster's EdgeFS image for latest one as described below.
## EdgeFS Version Upgrade
Official EddgeFS container images can be found on [Docker Hub](https://hub.docker.com/r/edgefs/edgefs/tags).
1. Update the EdgeFS image used for the EdgeFS cluster:
```console
# Parameterize the environment
export ROOK_SYSTEM_NAMESPACE="rook-edgefs-system"
export CLUSTER_NAME="rook-edgefs"
```
The majority of the upgrade will be handled by the Rook operator. Begin the upgrade by changing the
EdgeFS image field in the cluster CRD (`spec:edgefsImageName`).
```console
NEW_EDGEFS_IMAGE='edgefs/edgefs:latest'
kubectl -n $CLUSTER_NAME patch Cluster $CLUSTER_NAME --type=merge \
-p "{\"spec\": {\"edgefsImageName\": \"$NEW_EDGEFS_IMAGE\"}}"
```
or via console editor update the `edgefsImageName` property:
```console
kubectl edit -n $CLUSTER_NAME Cluster $CLUSTER_NAME
```
and save results.
2. Wait for the pod updates to complete:
As with upgrading Rook, you must now wait for the upgrade to complete. Determining when the EdgeFS
version has fully updated is rather simple.
```console
kubectl -n $CLUSTER_NAME describe pods | grep "Image:" | sort | uniq
# This cluster is not yet finished:
# Image: edgefs/edgefs:1.2.31
# Image: edgefs/edgefs:1.2.50
# Image: edgefs/edgefs-restapi:1.2.31
# Image: edgefs/edgefs-ui:1.2.31
# This cluster is also finished(all versions are the same):
# Image: edgefs/edgefs:1.2.50
# Image: edgefs/edgefs-restapi:1.2.50
# Image: edgefs/edgefs-ui:1.2.50
```
3. Verify the updated EdgeFS cluster:
Access to EdgeFS mgr pod and check EdgeFS system status
```console
kubectl exec -it -n $CLUSTER_NAME rook-edgefs-mgr-xxxx-xxx -- toolbox
efscli system status -v 1
```
## EdgeFS Nodes Update
Nodes can be added and removed over time by updating the Cluster CRD, for example with `kubectl edit Cluster -n rook-edgefs`.
This will bring up your default text editor and allow you to add and remove storage nodes from the cluster.
This feature is only available when `useAllNodes` has been set to `false` and `resurrect` mode is not used.
### Add node Example
1. Edit Cluster CRD `kubectl edit Cluster -n rook-edgefs`
2. Add new node section with desired configuration in storage section of Cluster CRD:
Currently we adding new node `node3072ub16` with two drives `sdb` and `sdc` on it.
```yaml
- config: null
devices:
- FullPath: ""
config: null
name: sdb
- FullPath: ""
config: null
name: sdc
name: node3072ub16
resources: {}
```
* Save CRD and operator will update all target nodes and related pods of the EdgeFS cluster.
* Login to EdgeFS mgr toolbox and adjust FlexHash table to a new configuration using `efscli system fhtable` command.
## EdgeFS Operator Upgrade
In terms of to bring new Rook Operator features on a running system, it needs to be upgraded first.
And once upgraded, you will need to create new CustomResourceDefinition(s).
1. Edit deployment with `kubectl edit deploy rook-edgefs-operator -n rook-edgefs-system` and set to a new version
2. Apply new CRDs or changes. Look at examples in cluster/examples/kubernetes/edgefs/operator.yaml.
3. Monitor operator logs with `kubectl logs rook-edgefs-operator-ID -n rook-edgefs-system`
-269
View File
@@ -1,269 +0,0 @@
---
title: VDEV Management
weight: 4910
indent: true
---
# EdgeFS VDEV Management
[Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989)
EdgeFS can run on top of any block device. It can be a raw physical or virtual disk (RT-RD type). Or it can be a directory on a local filesystem (RT-LFS type).
In case of a local filesystem, VDEV function will be emulated via memory-mapped files and as such, management of the files is a responsibility of underlying filesystem of choice. (e.g. ext4, xfs, zfs, etc).
This document describes the management of VDEVs built on top of raw disks (RT-RD type).
## EdgeFS on-disk organization
EdgeFS converts underlying block devices (VDEVs) into a local high-performance, memory and SSD/NVMe optimized key-value databases.
### Persistent data
The EdgeFS chunks a data object into one or several data chunk which are members of the `TT_CHUNK_PAYLOAD` data type that forms the first data type group: *the persistent data*. This group also includes a configuration data type called `TT_HASHCOUNT`.
### Persistent metadata
To define an object assembly order there are two manifest metadata types: `TT_CHUNK_MANIFEST` and `TT_VERSION_MANIFEST`. If an object is EC-protected, then an additional entry of `TT_PARTIY_MANIFEST` metadata type will be added to each leaf manifest. Payload's and manifest's lifespan depends on the presence of a tiny object of `TT_VERIFIED_BACKREF` type that tracks de-duplication back references in background operations. All the objects are indexed by its name within a cluster namespace and the index is stored in a `TT_NAMEINDEX` metadata type. Types `TT_CHUNK_MANIFEST`, `TT_VERSION_MANIFEST`, `TT_PARTIY_MANIFEST`, `TT_VERIFIED_BACKREF` and `TT_NAMEINDEX` form the second group: *the persistent metadata*.
### Temporary metadata
And the third group is *the temporary metadata*. It includes on-disk data queues whose entries are removed after being processed by server's background jobs: `TT_VERIFICATION_QUEUE`, `TT_BATCH_QUEUE`, `TT_INCOMING_BATCH_QUEUE`, `TT_ENCODING_QUEUE`, `TT_REPLICATION_QUEUE` and `TT_TRANSACTION_LOG`.
| Persistent data | Persistent metadata | Temporary metadata |
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `_TT_CHUNK_PAYLOAD_`<br/>`_TT_HASHCOUNT_` | `_TT_CHUNK_MANIFEST_`<br/>`_TT_VERSION_MANIFEST_`<br/>`_TT_PARTIY_MANIFEST_`<br/>`_TT_VERIFIED_BACKREF_`<br/>`_TT_NAMEINDEX_` | `_TT_VERIFICATION_QUEUE_`<br/>`_TT_BATCH_QUEUE_`<br/>`_TT_INCOMING_BATCH_QUEUE_`<br/>`_TT_ENCODING_QUEUE_`<br/>`_TT_REPLICATION_QUEUE_`<br/>`_TT_TRANSACTION_LOG_` |
### Consistency considerations
Each VDEV in the cluster holds a certain number of entries of each data type. Damage of data table of different groups has a different impact on VDEV's consistency. Usually, if a damaged data type belongs to _the temporary metadata_, then such data table can be dropped without a noticeable influence on the cluster. If a persistent data or persistent metadata gets corrupted, then impact will take place, however, it will never be vital for the cluster thanks to data protection approaches the EdgeFS implements: data redundancy or erasure coding. Moreover, the underlying device management layer also tries to reduce the cost of data loss by means of different techniques, like data sharding.
> **IMPORTANT**: In EdgeFS design, loss of a data or metadata chunk generally do not affect front I/O performance due to unique dynamic placement and retrieval technique. Data placement or retrieval gets negotiated prior to each chunk I/O. This allows EdgeFS to select the most optimal location for I/O rather then hard-coded. With this, failing device(s) or temporary disconnected/busy devices will not affect overall local cluster performance.
Stronger consistency/durability comes with a performance price and it highly depends on an use cases. EdgeFS provides needed flexibility of selecting most optimal consistency model via usage of `sync` parameter that defines default behavior of write operations at device or directory level. Acceptable values are 0, 1 (default), 2, 3:
* `0`: No syncing will happen. Highest performance possible and good for HPC scratch types of deployments. This option will still sustain crash of pods or software bugs. It will not sustain server power loss an may cause node/device level inconsistency.
* `1`: Default method. Will guarantee node / device consistency in case of power loss with reduced durability.
* `2`: Provides better durability in case of power loss at the cost of extra metadata syncing.
* `3`: Most durable and reliable option at the cost of significant performance impact.
## EdgeFS RT-RD Architecture
The main metrics of the RT-RD device is a partition level (the _plevel_). The _plevel_ defines a number of disk partitions user's data will be split across: for each key-value pair, the key identifies the _plevel index_. The RT-RD splits entire raw HDD (or SSD) into several partitions. The following partition types are defined:
* Main partitions. Resides on the HDD and used as the main data store. A number of partitions equal to disk _plevel_. In a all SSD or all HDD configurations, main partitions keep all data types.
* Write-ahead-log (_WAL_) partitions. The _WAL_ drastically improves write performance, especially for a hybrid (HDDs+SSD) configuration. There is one _WAL_ partition per _plevel_ Its location depends on configuration type. In a hybrid configuration, it's on SSD, otherwise on the same disk as the corresponding _main_ partition.
* A metadata offload partition (_mdoffload_). For the hybrid configuration-only. One partition per an HDD. It is used to store temporary metadata, indexes and some persistent metadata types (optionally).
* A configuration partition. A tiny partition per device which keeps a disk configuration options (a _metaloc entry_).
Regardless of location, each partition keeps an instance of a key-value database (_the environment_) and a number sub-databases for different data types within the environment. A sub-database is referenced by its Data Base Identifier(_DBI_) which contains data type name as a part of the _DBI_ and depends on the environment's location. Along with 3 aforementioned data type categories, the RT-RD keeps an extra one for a hybrid device - the _mdoffload index_. The _mdoffload index_ is used to improve the performance of GET operations that target the data types on HDD without data retrieval: chunk stat or an attribute get. A damaged _mdoffload index_ can always be restored from data on HDD.
Below is a data type to DBI mapping table
| Group | Data type | DBI | Location |
| ------------------- | ------------------------- | ----------------------------------------------------------------------------------- | ------------------- |
| Persistent data | `TT_CHUNK_PAYLOD` | `bd-part-TT_CHUNK_PAYLOAD-0` | HDD |
| &nbsp; | `TT_HASHCOUNT` | `bd-part-TT_HASHCOUNT-0` | HDD |
| Persistent metadata | `TT_CHUNK_MANIFEST` | `TT_CHUNK_MANIFEST`<br/>`bd-part-TT_CHUNK_MANIFEST-0` | SSD<br/>HDD |
| &nbsp; | `TT_VERSION_MANIFEST` | `TT_VERSION_MANIFEST`<br/>`bd-part-TT_VERSION_MANIFEST-0` | SSD<br/>HDD |
| &nbsp; | `TT_PARITY_MANIFEST` | `TT_PARITY_MANIFEST`<br/>`bd-part-TT_PARITY_MANIFEST-0` | SSD<br/>HDD |
| &nbsp; | `TT_NAMEINDEX` | `TT_NAMEINDEX`<br/>`bd-part-TT_NAMEINDEX-0` | SSD<br/>HDD |
| &nbsp; | `TT_VERIFIED_BACKREF` | `TT_VERIFIED_BACKREF`<br/>`bd-part-TT_VERIFIED_BACKREF-0` | SSD<br/>HDD |
| Temporary metadata | `TT_VERIFICATION_QUEUE` | `TT_VERIFICATION_QUEUE`<br/>`bd-part-TT_VERIFICATION_QUEUE-0` | SSD<br/>HDD |
| &nbsp; | `TT_BATCH_QUEUE` | `TT_BATCH_QUEUE`<br/>`bd-part-TT_BATCH_QUEUE-0` | SSD<br/>HDD |
| &nbsp; | `TT_INCOMING_BATCH_QUEUE` | `TT_INCOMING_BATCH_QUEUE`<br/>`bd-part-TT_INCOMING_BATCH_QUEUE-0` | SSD<br/>HDD |
| &nbsp; | `TT_ENCODING_QUEUE` | `TT_ENCODING_QUEUE`<br/>`bd-part-TT_ENCODING_QUEUE-0` | SSD<br/>HDD |
| &nbsp; | `TT_REPLICATION_QUEUE` | `TT_REPLICATION_QUEUE`<br/>`bd-part-TT_REPLICATION_QUEUE-0` | SSD<br/>HDD |
| &nbsp; | `TT_TRANSACTION_LOG` | `TT_TRANSACTION_LOG`<br/>`bd-part-TT_TRANSACTION_LOG-0` | SSD<br/>HDD |
| Mdoffload index | `-` | `keys-TT_CHUNK_MANIFEST`<br/>`keys-TT_CHUNK_PAYLOAD`<br/>`keys-TT_VERSION_MANIFEST` | SSD<br/>SSD<br/>SSD |
| Mdoffload cache | `-` | `mdcache-TT_CHUNK_MANIFEST`<br/>`mdcache-TT_VERSION_MANIFEST` | SSD<br/>SSD |
So now you are informed enough to understand next paragraphs.
## Cluster Health Verification
Login to the toolbox as shown in this example:
```console
kubectl exec -it -n rook-edgefs 'kubectl get po --all-namespaces | awk '{print($2)}' | grep edgefs-mgr' -- env COLUMNS=$COLUMNS LINES=$LINES TERM=linux toolbox
```
To find out what device needs to go into the maintenance state, run the following command:
```console
# efscli system status -v1
ServerID CFAE1E62652370A93769378B2C862F23 ubuntu1632243:rook-edgefs-target-0 DEGRADED
VDEVID D76242575CAA2662862CEEBC65D0B69F ata-ST1000NX0423_W470M48T ONLINE
VDEVID B2BB69729BC3EB9ECE5F0DCB3DB4D0D6 ata-ST1000NX0423_W470NQ7A FAULTED
VDEVID BB287F0C6747B1E59A85872B2C7F39B3 ata-ST1000NX0423_W470P9XJ ONLINE
VDEVID 82F9A02F0D2A1BC44E6AF8D2B455189D ata-ST1000NX0423_W470M3JK ONLINE
ServerID 1A0B10BCF8CB0E6D34451B4D3F84CE97 ubuntu1632240:rook-edgefs-target-1 ONLINE
VDEVID 904ED942BD62FF4A997C4A23E2B8043B ata-ST1000NX0423_W470NLFR ONLINE
...
```
From this command you will see that pod 'rook-edgefs-target-0' is in degraded state and device 'ata-ST1000NX0423_W470NQ7A' needs maintenance.
## VDEV Verification
Login to the affected target pod as shown in this example:
```console
kubectl exec -it -n rook-edgefs rook-edgefs-target-0 -- env COLUMNS=$COLUMNS LINES=$LINES TERM=linux toolbox
```
Make sure the disk is faulted:
```console
# efscli device list
NAME | VDEV ID | PATH | STATUS
+---------------------------+----------------------------------+----------+--------+
ata-ST1000NX0423_W470M3JK | 82F9A02F0D2A1BC44E6AF8D2B455189D | /dev/sdb | ONLINE
ata-ST1000NX0423_W470M48T | D76242575CAA2662862CEEBC65D0B69F | /dev/sdc | ONLINE
ata-ST1000NX0423_W470P9XJ | BB287F0C6747B1E59A85872B2C7F39B3 | /dev/sdd | ONLINE
ata-ST1000NX0423_W470NQ7A | B2BB69729BC3EB9ECE5F0DCB3DB4D0D6 | /dev/sde | UNAVAILABLE
```
Use `efscli device detach ata-ST1000NX0423_W470NQ7A` for detaching a disk. It will be marked a faulted and won't be attached at the next `ccow-daemon` restart. Also, the preserved detached state can be cleared by a command `nezap --disk=diskID --restore-metaloc`.
Once detached, related HDD/SSD partitions can be inspected/fixed by means of `efscli device check` command or zapped. When maintenance is done, the VDEV(s) can become operational again by invoking a command `efscli device attach`.
Assuming that your disk is detached and your verification procedure can be initiated. The tool is accessible via `efscli device check` command. It provides an interactive user interface for device validation and recovery. Before getting started, a user needs to define a scratch area location. It will be used as a temporary store for environments being compacted or recovered. The scratch area can be defined in terms of data path within filesystem, a path to a raw disk (or its partition) in the `/dev/` folder or raw disk/partition ID. User has to make sure the filesystem can provide enough free space to keep data from single `plevel`. The same requirement is for raw disk/partition size: at least 600GB, 1TB is recommended. A user can define the scratch area path in `$(NEDGE_HOME)/etc/ccow/rt-rd.json` as follow:
```json
{
"devices": [...],
"scratch": "/tmp.db"
}
```
Alternatively, the path can be specified by `-s <path>` flag. For example: `efscli device check -s /scratch.db ata-ST1000NX0423_W470NQ7A`
The following actions will be completely interactive and a user's confirmation will be required before any important disk changes. The command output might look like follow. We split it into parts for convenience
```console
$ efscli device check -s /scratch.db ata-ST1000NX0423_W470NQ7A
INFO: checking disk /dev/sde. Stored metaloc record info:
NAME | TYPE | ID | PATH | CAPACITY | USED | PSIZE | BCACHE | STATUS
+---------+------+---------------------------------+------------+----------+------+-------+--------+-----------+
PLEVEL1 | Main | ata-ST1000NX0423_W470NQ7A-part1 | /dev/sde1 | 465.76G | 0% | 32k | OFF | None
| WAL | scsi-35000c5003021f02f-part7 | /dev/sdf7 | 2.67G | | 4k | n/a | None
PLEVEL2 | Main | ata-ST1000NX0423_W470NQ7A-part2 | /dev/sde2 | 465.76G | 0% | 32k | OFF | None
| WAL | scsi-35000c5003021f02f-part8 | /dev/sdf8 | 2.67G | | 4k | n/a | None
OFFLOAD | | scsi-35000c5003021f02f-part12 | /dev/sdf12 | 180.97G | 0% | 8k | n/a | CORRUPTED
```
The first table displays the VDEV configuration and its known errors (if any). In our example the VDEV is a hybrid one (The OFFLOAD partition signals that) with 2 _plevels_ situated on the HDD `/dev/sde`. Main partitions are `/dev/sde1` and `/dev/sde2`, WAL partitions are on SSD (`/dev/sdf7` and `/dev/sdf8`) as well as the mdoffload partition `/dev/sdf12`. For each partition we see its capacity, utilization, logical paze size (internal for the key-value engine), bcache presence and healthy status. `None` means the partition doesn't have know errors. However, the `/dev/sdf12` is marked as a `CORRUPTED` and will be check by the verification algorithm. If there known errors are absent, then user will be asked for extended data validation of each partition. It's important to mention, that if a VDEV is online and user wants to validate it, then such VDEV will be set `READ-ONLY` until validation is in progress. If there are any errors, then the VDEV will be detached for maintenance. However, in our case the problem is known and it requires further validation in order to find a proper recovery solution.
```console
WARN: a fault record is detected for mdoffload (/dev/sdf12)
INFO: disk ata-ST1000NX0423_W470NQ7A is UNAVAILABLE
INFO: locking the device
INFO: 1 partition(s) needs to be validated
INFO: validating /dev/sdf12
Progress: [==============================>] 100%
DBI NAME | ENTRIES | OPEN TEST | READ TEST | CORRUPTED | WRITE TEST
+--------------------------+---------+-----------+--------------------+-----------+------------+
TT_TRANSACTION_LOG | 0 | PASSED | PASSED | N/A | SKIPPED
keys-TT_VERSION_MANIFEST | 28999 | PASSED | PASSED | N/A | SKIPPED
TT_BATCH_INCOMING_QUEUE | 0 | PASSED | PASSED | N/A | SKIPPED
TT_ENCODING_QUEUE | 0 | PASSED | PASSED | N/A | SKIPPED
TT_PARITY_MANIFEST | 0 | PASSED | PASSED | N/A | SKIPPED
TT_REPLICATION_QUEUE | 0 | PASSED | PASSED | N/A | SKIPPED
keys-TT_CHUNK_MANIFEST | 56448 | PASSED | PASSED | N/A | SKIPPED
TT_BATCH_QUEUE | 0 | PASSED | PASSED | N/A | SKIPPED
TT_VERIFIED_BACKREF | 55403 | PASSED | PASSED | N/A | SKIPPED
keys-TT_CHUNK_PAYLOAD | 212787 | PASSED | KEY FORMAT ERROR | N/A | N/A
TT_CHUNK_MANIFEST | 56448 | PASSED | CORRUPTED | N/A | N/A
TT_NAMEINDEX | 189 | PASSED | PASSED | N/A | SKIPPED
TT_VERIFICATION_QUEUE | 29 | PASSED | PASSED | N/A | SKIPPED
TT_VERSION_MANIFEST | 28999 | PASSED | DB STRUCTURE ERROR | N/A | N/A
ERROR: the mdoffload environment got unrecoverable damages.
ENTIRE device /dev/sdf12 needs to be formatted. All the data will be lost.
Press 'Y' to start [y/n]: y
```
The validation is performed on a sub-database (DB) basis. For each DB there are up to 3 tests: open, read and modify. The last (modify) is disabled by default but can be activated in a policy file. The open and read tests are able to discover an overwhelming majority of structural errors without detaching a disk from ccow-daemon: if an environment is online, the user will be asked for permission to switch the device to read-only mode before any tests. The modify test requires the device to be set unavailable. Validation result is shown as a table for each DBI.
The table has a column named `CORRUPTED` which may show number key-value pairs whose value's hash ID doesn't match expected one. For certain data types, it's acceptable to have a limited number of damaged entries. It's a compromise between data lost cost and data integrity. Often we don't want to mark the whole DB as faulted due to just a few damaged values which will be detected and removed by ccow-daemon soon or later.
Further behaviour depends on validation results:
* If there are no corrupted DB(s), the environment is considered healthy.
* If there are damaged DB(s), then the behaviour depends on DB's error handling policy. By default it implies the following:
* If corrupted only temporary metadata or those data can be reconstructed (the _mdoffload index_), then a selective recovery will be suggested to the user. The selective recovery makes copies of non-damaged DBs only. Corrupted ones will be re-created or re-constructed when the device is attached.
* Corrupted data or metadata table with sensitive data. In this case, a _plevel_ or whole device needs to be formatted. All damaged environments will be added to a format queue that will be processed on the final stage.
As we can see 3 DBs are corrupted. One of them (`keys-TT_CHUNK_PAYLOAD`) can be easily recovered (the _mdoffload index_), however `TT_NAMEINDEX` and `TT_VERSION_MANIFEST` cannot be reconstructed and they reside on a mdoffload partition. So the whole device needs to be formatted.
```console
WARN: the entire device is about to be formatted.
ALL the data on it will be LOST. Do you want to proceed? [y/n]: y
INFO: formatting entire device ata-ST1000NX0423_W470NQ7A
INFO: format done
INFO: device examination summary:
VALIDATED | FORMATTED | RECOVERED | COMPACTIFIED
+------------+------------+-----------+--------------+
/dev/sdf12 | /dev/sde1 | |
| /dev/sde2 | |
| /dev/sdf12 | |
```
A user confirmed and the VDEV has been formatted. Check is done. The VDEV can be put online by a command `efscli device attach ata-ST1000NX0423_W470NQ7A`
## VDEV Replacement Procedure
A command `efscli disk replace [-f] [-y] <old-name> <new-name>` performs on-the-fly disk substitution.
The disk with name `old-name` will be detached and disk with name `new-name` will be configured and used instead of the old one. If the `new-disk` has a partition table on it, then the command will fail unless the `-f` flag is specified. When the flag set, the user will be asked for permission to destroy the partition table. The '-y' flags forces destruction of the partition table without confirmation. The `replace` command can be used when EdgeFS service is down. In this case, the new disk will be attached upon the next service start.
Login to the affected target pod where disk needs to be replaced as shown in this example:
```console
kubectl exec -it -n rook-edgefs rook-edgefs-target-0 -- env COLUMNS=$COLUMNS LINES=$LINES TERM=linux toolbox
```
List available and unused disks:
```console
# efscli device list -s
NAME | VDEV ID | PATH | STATUS
+---------------------------+----------------------------------+----------+-------------+
ata-ST1000NX0423_W470M4BZ | | /dev/sda | UNUSED
ata-ST1000NX0423_W470M3JK | 147A81246937AEFF934D00C8DB92C4D3 | /dev/sdb | ONLINE
ata-ST1000NX0423_W470M48T | DCA10919B6F55A66A23BC5916642DD7E | /dev/sdc | ONLINE
ata-ST1000NX0423_W470P9XJ | C82B78AC845989DC731BF59FE705256A | /dev/sdd | ONLINE
ata-ST1000NX0423_W470NQ7A | BCA4C8F096DE96B4B350DF4F92E30F19 | /dev/sde | UNAVAILABLE
```
There is a device with an `UNUSED` or `PARTITIONED` status. The disk `ST1000NX0423_W470M4BZ` is not used and can replace a faulted one.
```console
# efscli device replace ata-ST1000NX0423_W470NQ7A ata-ST1000NX0423_W470M4BZ
INFO: Probbing disk ata-ST1000NX0423_W470M4BZ
INFO: Attaching disk ata-ST1000NX0423_W470M4BZ
INFO: The disk is replaced succefully
```
## VDEV server recovery
If a database partition gets corrupted, then there is a small probability for the VDEV container to enter an infinite restart loop. In order to prevent a container from restart use the following command:
```console
kubectl exec -it -n rook-edgefs rook-edgefs-target-<n> -c auditd -- touch /opt/nedge/var/run/.edgefs-start-block-ccowd
```
where `rook-edgefs rook-edgefs-target-<n>` is the affected pod ID.
Once command is done, you must be able to reach a toolbox console:
```console
kubectl exec -it -n rook-edgefs rook-edgefs rook-edgefs-target-<n> -- env COLUMNS=$COLUMNS LINES=$LINES TERM=linux toolbox
```
and run the `efscli device check ...` command.
**When you are done**, before exiting the toolbox, do not forget to remove the file /opt/nedge/var/run/.edgefs-start-block-ccowd
+6 -7
View File
@@ -14,10 +14,9 @@ Rook provides a growing number of storage providers to a Kubernetes cluster, eac
**Follow these guides to get started with each provider**:
| Storage Provider | Status | Description |
| ------------------------------ | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Ceph](ceph-quickstart.md) | Stable / V1 | Ceph is a highly scalable distributed storage solution for block storage, object storage, and shared filesystems with years of production deployments. |
| [Cassandra](cassandra.md) | Alpha | Cassandra is a highly available NoSQL database featuring lightning fast performance, tunable consistency and massive scalability. |
| [EdgeFS](edgefs-quickstart.md) | [Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989) | EdgeFS is high-performance and fault-tolerant decentralized data fabric with access to object, file, NoSQL and block. |
| [NFS](nfs.md) | Alpha | NFS allows remote hosts to mount filesystems over a network and interact with those filesystems as though they are mounted locally. |
| [YugabyteDB](yugabytedb.md) | Alpha | YugaByteDB is a high-performance, cloud-native distributed SQL database which can tolerate disk, node, zone and region failures automatically. |
| Storage Provider | Status | Description |
| --------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Ceph](ceph-quickstart.md) | Stable / V1 | Ceph is a highly scalable distributed storage solution for block storage, object storage, and shared filesystems with years of production deployments. |
| [Cassandra](cassandra.md) | Alpha | Cassandra is a highly available NoSQL database featuring lightning fast performance, tunable consistency and massive scalability. |
| [NFS](nfs.md) | Alpha | NFS allows remote hosts to mount filesystems over a network and interact with those filesystems as though they are mounted locally. |
| [YugabyteDB](yugabytedb.md) | Alpha | YugaByteDB is a high-performance, cloud-native distributed SQL database which can tolerate disk, node, zone and region failures automatically. |
-1
View File
@@ -174,7 +174,6 @@ storage provider that has integration tests:
* `[test cassandra]`
* `[test ceph]`
* `[test edgefs]`
* `[test nfs]`
Since the majority of effort for a PR generally focuses on a single storage provider it will save time
Vendored
-2
View File
@@ -64,8 +64,6 @@ pipeline {
} else {
env.shouldBuild = "false"
}
} else if (body.contains("[test edgefs]") || title.contains("edgefs:")) {
env.testProvider = "edgefs"
} else if (body.contains("[test nfs]") || title.contains("nfs:")) {
env.testProvider = "nfs"
} else if (body.contains("[test yugabytedb]") || title.contains("yugabytedb:")) {
+1 -1
View File
@@ -85,7 +85,7 @@ More details about API versioning and status in Kubernetes can be found on the K
| CockroachDB | [CockroachDB](https://www.cockroachlabs.com/product/cockroachdb/) is a cloud-native SQL database for building global, scalable cloud services that survive disasters. | cockroachdb.rook.io/v1alpha1 | [Deprecated](https://github.com/rook/rook/issues/6990)* |
| EdgeFS | [EdgeFS](http://edgefs.io) is high-performance and fault-tolerant decentralized data fabric with access to object, file, NoSQL and block. | edgefs.rook.io/v1 | [Deprecated](https://github.com/rook/rook/issues/5823#issuecomment-703834989)* |
\* CockroachDB was removed from Rook in v1.6. See [Rook v1.5](https://rook.github.io/docs/rook/v1.5/) docs if still interested.
\* EdgeFS and CockroachDB were removed from Rook in v1.6. See [Rook v1.5](https://rook.github.io/docs/rook/v1.5/) docs if still interested.
### Official Releases
+1 -1
View File
@@ -18,7 +18,7 @@
# Disables quote checks, which is needed because of the SED variable here.
KUBE_CODE_GEN_VERSION="kubernetes-1.17.2"
GROUP_VERSIONS="rook.io:v1 rook.io:v1alpha2 ceph.rook.io:v1 nfs.rook.io:v1alpha1 cassandra.rook.io:v1alpha1 edgefs.rook.io:v1 yugabytedb.rook.io:v1alpha1"
GROUP_VERSIONS="rook.io:v1 rook.io:v1alpha2 ceph.rook.io:v1 nfs.rook.io:v1alpha1 cassandra.rook.io:v1alpha1 yugabytedb.rook.io:v1alpha1"
scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
codegendir="${scriptdir}/../../vendor/k8s.io/code-generator"
+1 -1
View File
@@ -103,7 +103,7 @@ endif
echo.%: ; @echo $* = $($*)
# Select which images (backends) to make; default to all possible images
IMAGES ?= ceph nfs cassandra edgefs yugabytedb
IMAGES ?= ceph nfs cassandra yugabytedb
COMMA := ,
SPACE :=
@@ -1,206 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: rook-edgefs
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: rook-edgefs-cluster
namespace: rook-edgefs
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-edgefs-cluster
namespace: rook-edgefs
rules:
- apiGroups: [""]
resources: ["configmaps", "endpoints"]
verbs: [ "get", "list", "watch", "create", "update", "delete" ]
- apiGroups: ["edgefs.rook.io"]
resources: ["*"]
verbs: ["*"]
- apiGroups: [""]
resources: ["pods"]
verbs: [ "get", "list" ]
- apiGroups: ["extensions"]
resources: ["deployments/scale"]
verbs: [ "get", "update" ]
---
# Allow the operator to create resources in this cluster's namespace
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-edgefs-cluster-mgmt
namespace: rook-edgefs
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: rook-edgefs-cluster-mgmt
subjects:
- kind: ServiceAccount
name: rook-edgefs-system
namespace: rook-edgefs-system
---
# Allow the pods in this namespace to work with configmaps
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-edgefs-cluster
namespace: rook-edgefs
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: rook-edgefs-cluster
subjects:
- kind: ServiceAccount
name: rook-edgefs-cluster
namespace: rook-edgefs
---
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: privileged
spec:
fsGroup:
rule: RunAsAny
privileged: true
runAsUser:
rule: RunAsAny
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
volumes:
- '*'
allowedCapabilities:
- '*'
hostPID: true
hostIPC: true
hostNetwork: false
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: privileged-psp-user
rules:
- apiGroups:
- apps
resources:
- podsecuritypolicies
resourceNames:
- privileged
verbs:
- use
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: rook-edgefs-system-psp
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: privileged-psp-user
subjects:
- kind: ServiceAccount
name: rook-edgefs-system
namespace: rook-edgefs-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: rook-edgefs-cluster-psp
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: privileged-psp-user
subjects:
- kind: ServiceAccount
name: rook-edgefs-cluster
namespace: rook-edgefs
---
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
namespace: rook-edgefs
spec:
edgefsImageName: edgefs/edgefs:latest # specify version here, i.e. edgefs/edgefs:1.2.117 etc
serviceAccount: rook-edgefs-cluster
dataDirHostPath: /var/lib/edgefs
#dataVolumeSize: 10Gi
#devicesResurrectMode: "restoreZapWait"
#dashboard:
# localAddr: 10.3.30.75
#network: # cluster level networking configuration
# provider: host
# selectors:
# server: "enp2s0f0"
# broker: "enp2s0f0"
#skipHostPrepare: true
#maxContainerCapacity: 132Ti
#sysRepCount: 1 # SystemReplicationCount [1..n](default is 3)
#failureDomain: "device" # Cluster's failureDomain ["device", "host", "zone"] (default is "host")
#trlogProcessingInterval: 2 # set transaction log processing interval to 2s to speed up ISGW Link delivery
#trlogKeepDays: 2 # keep up to 2 days of transaction log interval batches to reduce local storage overhead
#useHostLocalTime: true
storage: # cluster level storage configuration and selection
useAllNodes: true
# directories:
# - path: /mnt/disks/ssd0
# - path: /mnt/disks/ssd1
# - path: /mnt/disks/ssd2
useAllDevices: true
# config:
# mdReserved: "30" # allocate only 30% of offloaded SSD/NVMe slice for Metadata, the rest keep for BCache
# hddReadAhead: "2048" # speed up reads of 2MB+ chunks of HDD (offload use case)
# rtVerifyChid: "0" # may improve CPU utilization
# lmdbPageSize: "32768" # larger value can improve stream operations
# lmdbMdPageSize: "4096" # smaller value can improve metadata offload device utilization
# useMetadataOffload: "true" # enable use of SSD device as metadata offload
# useBCache: "true" # enable SSD cache device and read-cache
# useBCacheWB: "true" # enable SSD write-cache
# useMetadataMask: "0x7d" # all metadata on SSD except second level manifests
# rtPLevelOverride: "4" # enable large device partitioning, only needed if automatic not working
# sync: "0" # highest performance, consistent on pod/software failures, not-consistent on power failures
# useAllSSD: "true" # use only SSDs during deployment
# zone: "1" # defines failure domain's zone number for all edgefs nodes
# nodes:
# - name: node3071ub16
# - name: node3072ub16
# - name: node3073ub16
# - name: node3074ub16 # node level storage configuration
# devices: # specific devices to use for storage can be specified for each node
# - name: "sdb"
# - name: "sdc"
# config: # configuration can be specified at the node level which overrides the cluster level config
# rtPLevelOverride: 8
# zone: "2" # defines failure domain's zone number for specific node(node3074ub16)
#resources:
# limits:
# cpu: "2"
# memory: "4096Mi"
# requests:
# cpu: "2"
# memory: "4096Mi"
# A key value list of annotations
#annotations:
# all:
# key: value
# mgr:
# prepare:
# target:
#placement:
# all:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: nodekey
# operator: In
# values:
# - edgefs-target
# tolerations:
# - key: taintKey
# operator: Exists
@@ -1,193 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: rook-edgefs
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: rook-edgefs-cluster
namespace: rook-edgefs
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-edgefs-cluster
namespace: rook-edgefs
rules:
- apiGroups: [""]
resources: ["configmaps", "endpoints"]
verbs: [ "get", "list", "watch", "create", "update", "delete" ]
- apiGroups: ["edgefs.rook.io"]
resources: ["*"]
verbs: ["*"]
- apiGroups: [""]
resources: ["pods"]
verbs: [ "get", "list" ]
- apiGroups: ["extensions"]
resources: ["deployments/scale"]
verbs: [ "get", "update" ]
---
# Allow the operator to create resources in this cluster's namespace
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-edgefs-cluster-mgmt
namespace: rook-edgefs
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: rook-edgefs-cluster-mgmt
subjects:
- kind: ServiceAccount
name: rook-edgefs-system
namespace: rook-edgefs-system
---
# Allow the pods in this namespace to work with configmaps
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-edgefs-cluster
namespace: rook-edgefs
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: rook-edgefs-cluster
subjects:
- kind: ServiceAccount
name: rook-edgefs-cluster
namespace: rook-edgefs
---
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: privileged
spec:
fsGroup:
rule: RunAsAny
privileged: true
runAsUser:
rule: RunAsAny
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
volumes:
- '*'
allowedCapabilities:
- '*'
hostPID: true
hostIPC: true
hostNetwork: false
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: privileged-psp-user
rules:
- apiGroups:
- apps
resources:
- podsecuritypolicies
resourceNames:
- privileged
verbs:
- use
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: rook-edgefs-system-psp
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: privileged-psp-user
subjects:
- kind: ServiceAccount
name: rook-edgefs-system
namespace: rook-edgefs-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: rook-edgefs-cluster-psp
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: privileged-psp-user
subjects:
- kind: ServiceAccount
name: rook-edgefs-cluster
namespace: rook-edgefs
---
apiVersion: edgefs.rook.io/v1
kind: Cluster
metadata:
name: rook-edgefs
namespace: rook-edgefs
spec:
edgefsImageName: edgefs/edgefs:latest # specify version here, i.e. edgefs/edgefs:1.2.117 etc
serviceAccount: rook-edgefs-cluster
dataDirHostPath: /var/lib/edgefs
sysRepCount: 2 # number of chunk replicas to keep. Overrides default one (3)
failureDomain: device # failure domain: "device", "host" or "zone". Overrides automatically calculated one
#devicesResurrectMode: "restoreZapWait"
#dashboard:
# localAddr: 10.3.30.75
#network: # cluster level networking configuration
# provider: host
# selectors:
# server: "enp2s0f0"
# broker: "enp2s0f0"
#skipHostPrepare: true
#trlogProcessingInterval: 2 # set transaction log processing interval to 2s to speed up ISGW Link delivery
#trlogKeepDays: 2 # keep up to 2 days of transaction log interval batches to reduce local storage overhead
#useHostLocalTime: true
storage: # cluster level storage configuration and selection
useAllNodes: false
directories:
- path: /media # if the RTKVS is chosen, then the directory will be used as a journal to store metadata. Mandatory for RTKVS.
useAllDevices: false
config:
useRtkvsBackend: kvssd # Use the RTKVS store driver. Value is the backend ID. The "kvssd" is for Samsung's KV SSD
# rtVerifyChid: "0" # may improve CPU utilization
rtPLevelOverride: "16" # enable large device partitioning, only needed if automatic not working
maxSizeGB: "32" # RTKVS: max.space allocated for a journal
sync: "0" # highest performance, consistent on pod/software failures, not-consistent on power failures
walMode: "off" # Write-ahead-log mode. From a set: "on" - enabled, "off" - disabled, "metadata" - use the WAL for data type stored on the metadata SSD (RTKVS only)
# zone: "1" # defines failure domain's zone number for all edgefs nodes
nodes:
- name: "msl-colo-client20"
devices:
- name: "nvme0n1" # for the RTKVS store, the user needs to specify explicitly devices (KV SSD drives for in this example) to be used.
- name: "nvme1n1"
# config: # configuration can be specified at the node level which overrides the cluster level config
# rtPLevelOverride: 8
# zone: "2" # defines failure domain's zone number for specific node(node3074ub16)
#resources:
# limits:
# cpu: "2"
# memory: "4096Mi"
# requests:
# cpu: "2"
# memory: "4096Mi"
# A key value list of annotations
#annotations:
# all:
# key: value
# mgr:
# prepare:
# target:
#placement:
# all:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: nodekey
# operator: In
# values:
# - edgefs-target
# tolerations:
# - key: taintKey
# operator: Exists
@@ -1,17 +0,0 @@
# edgefs-iscsi-csi-driver config file to create k8s secret
#
# $ kubectl create secret generic edgefs-iscsi-csi-driver-config --from-file=./edgefs-iscsi-csi-driver-config.yaml
#
#Edgefs k8s cluster options
k8sEdgefsNamespaces: ["rook-edgefs"] #element 0 is a default edgefs cluster namespace, add more when needed
k8sEdgefsMgmtPrefix: rook-edgefs-mgr #edgefs cluster management prefix
#Edgefs csi operatins options
cluster: cltest #substitution edgefs cluster name for csi operations
tenant: test #substitution edgefs tenant name for csi operations
bucket: bk1 #substitution edgefs bucket name for csi operations
# Edgefs connection options
username: admin #edgefs k8s cluster grpc connection username
password: admin #edgefs k8s cluster grpc connection password
@@ -1,341 +0,0 @@
# Edgefs ISCSI CSI Driver (master)
#
# This driver version works with Kubernetes version >=1.13
#
# In production, each CSI driver deployment has to be customized to avoid conflicts,
# use non-default namespace and different names for non-namespaced entities like the ClusterRole
#
# Before installation, make sure "csidrivers" and "csinodeinfos" resource types exist:
# $ kubectl create -f https://raw.githubusercontent.com/kubernetes/csi-api/ce972859c46136a1f4a9fe119d05482a739c6311/pkg/crd/manifests/csidriver.yaml
# $ kubectl create -f https://raw.githubusercontent.com/kubernetes/csi-api/ce972859c46136a1f4a9fe119d05482a739c6311/pkg/crd/manifests/csinodeinfo.yaml
#
# Install to Kubernetes:
# $ kubectl apply -f deploy/kubernetes/edgefs-iscsi-csi-driver.yaml
#
# ----------------------
# Edgefs ISCSI CSI Driver
# ----------------------
apiVersion: csi.storage.k8s.io/v1alpha1
kind: CSIDriver
metadata:
name: io.edgefs.csi.iscsi
spec:
attachRequired: false
podInfoOnMountVersion: ''
---
# ---------------------------------
# Edgefs ISCSI CSI Controller Server
# ---------------------------------
#
# Runs single driver controller server (driver + provisioner + attacher + snapshotter) on one of the nodes
#
apiVersion: v1
kind: ServiceAccount
metadata:
name: edgefs-iscsi-csi-controller-service-account
namespace: default # replace with non-default namespace name if needed
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: edgefs-iscsi-csi-controller-cluster-role
rules:
- apiGroups: ['']
resources: ['secrets']
verbs: ['get', 'list']
- apiGroups: ['']
resources: ['persistentvolumes']
verbs: ['get', 'list', 'watch', 'create', 'update', 'delete'] # "update" for attacher
- apiGroups: ['']
resources: ['persistentvolumeclaims']
verbs: ['get', 'list', 'watch', 'update']
- apiGroups: ['storage.k8s.io']
resources: ['storageclasses']
verbs: ['get', 'list', 'watch']
- apiGroups: ['']
resources: ['events']
verbs: ['list', 'watch', 'create', 'update', 'patch']
- apiGroups: ['snapshot.storage.k8s.io']
resources: ['volumesnapshots']
verbs: ['get', 'list']
- apiGroups: ['snapshot.storage.k8s.io']
resources: ['volumesnapshotcontents']
verbs: ['get', 'list']
- apiGroups: [""]
resources: ["services"]
verbs: ["get", "list", "watch", "update"]
# attacher specific
- apiGroups: ['']
resources: ['nodes']
verbs: ['get', 'list', 'watch']
- apiGroups: ['csi.storage.k8s.io']
resources: ['csinodeinfos']
verbs: ['get', 'list', 'watch']
- apiGroups: ['storage.k8s.io']
resources: ['volumeattachments']
verbs: ['get', 'list', 'watch', 'update']
# snapshotter specific
- apiGroups: ['snapshot.storage.k8s.io']
resources: ['volumesnapshotclasses']
verbs: ['get', 'list', 'watch']
- apiGroups: ['snapshot.storage.k8s.io']
resources: ['volumesnapshotcontents']
verbs: ['create', 'get', 'list', 'watch', 'update', 'delete']
- apiGroups: ['snapshot.storage.k8s.io']
resources: ['volumesnapshots']
verbs: ['get', 'list', 'watch', 'update']
- apiGroups: ['apiextensions.k8s.io']
resources: ['customresourcedefinitions']
verbs: ['create', 'list', 'watch', 'delete']
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: edgefs-iscsi-csi-controller-cluster-role-binding
subjects:
- kind: ServiceAccount
name: edgefs-iscsi-csi-controller-service-account
namespace: default # replace with non-default namespace name if needed
roleRef:
kind: ClusterRole
name: edgefs-iscsi-csi-controller-cluster-role
apiGroup: rbac.authorization.k8s.io
---
kind: Service
apiVersion: v1
metadata:
name: edgefs-iscsi-csi-controller
labels:
app: edgefs-iscsi-csi-controller
spec:
selector:
app: edgefs-iscsi-csi-controller
ports:
- name: dummy
port: 12345
---
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: edgefs-iscsi-csi-controller
spec:
selector:
matchLabels:
app: edgefs-iscsi-csi-controller
serviceName: edgefs-iscsi-csi-controller
replicas: 1
template:
metadata:
labels:
app: edgefs-iscsi-csi-controller
spec:
serviceAccount: edgefs-iscsi-csi-controller-service-account
containers:
# csi-provisioner: sidecar container that watches Kubernetes PersistentVolumeClaim objects
# and triggers CreateVolume/DeleteVolume against a CSI endpoint
- name: csi-provisioner
image: quay.io/k8scsi/csi-provisioner:v1.0.1
imagePullPolicy: IfNotPresent
args:
- --connection-timeout=25s
- --provisioner=io.edgefs.csi.iscsi
- --csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy
# csi-attacher: sidecar container that watches Kubernetes VolumeAttachment objects
# and triggers ControllerPublish/Unpublish against a CSI endpoint
- name: csi-attacher
image: quay.io/k8scsi/csi-attacher:v1.0.1
imagePullPolicy: IfNotPresent
args:
- --v=3
- --csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy
- name: csi-snapshotter
image: quay.io/k8scsi/csi-snapshotter:v1.0.1
imagePullPolicy: IfNotPresent
args:
- --connection-timeout=25s
- --csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy
- name: driver
image: edgefs/edgefs-csi:latest
imagePullPolicy: Always
args:
- --role=controller
- --driverType=iscsi
- --nodeid=$(KUBE_NODE_NAME)
- --endpoint=unix://csi/csi.sock
- --verbose=debug
env:
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: secret
mountPath: /config
readOnly: true
volumes:
- name: socket-dir
emptyDir:
- name: secret
secret:
secretName: edgefs-iscsi-csi-driver-config
---
# ---------------------------
# Edgefs ISCSI CSI Node Server
# ---------------------------
#
# Runs driver node server (driver + registrar) on each node
#
apiVersion: v1
kind: ServiceAccount
metadata:
name: edgefs-iscsi-csi-node-service-account
namespace: default # replace with non-default namespace name if needed
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: edgefs-iscsi-csi-node-cluster-role
rules:
- apiGroups: ['']
resources: ['events']
verbs: ['get', 'list', 'watch', 'create', 'update', 'patch']
- apiGroups: [""]
resources: ["services"]
verbs: ["get", "list", "watch", "update"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: edgefs-iscsi-csi-node-cluster-role-binding
subjects:
- kind: ServiceAccount
name: edgefs-iscsi-csi-node-service-account
namespace: default # replace with non-default namespace name if needed
roleRef:
kind: ClusterRole
name: edgefs-iscsi-csi-node-cluster-role
apiGroup: rbac.authorization.k8s.io
---
# EdgeFS Node Server as a daemon
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: edgefs-iscsi-csi-node
spec:
selector:
matchLabels:
app: edgefs-iscsi-csi-node
template:
metadata:
labels:
app: edgefs-iscsi-csi-node
spec:
serviceAccount: edgefs-iscsi-csi-node-service-account
hostNetwork: true
containers:
# driver-registrar: sidecar container that:
# 1) registers the CSI driver with kubelet
# 2) adds the drivers custom NodeId to a label on the Kubernetes Node API Object
- name: driver-registrar
image: quay.io/k8scsi/csi-node-driver-registrar:v1.0.1
imagePullPolicy: IfNotPresent
args:
- --v=3
- --csi-address=/csi/csi.sock
- --kubelet-registration-path=/var/lib/kubelet/plugins_registry/io.edgefs.csi.iscsi/csi.sock
env:
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: registration-dir
mountPath: /registration
- name: driver
securityContext:
privileged: true
capabilities:
add: ['SYS_ADMIN',"SYS_RESOURCE", "IPC_LOCK"]
allowPrivilegeEscalation: true
image: edgefs/edgefs-csi:latest
imagePullPolicy: Always
args:
- --role=node
- --driverType=iscsi
- --nodeid=$(KUBE_NODE_NAME)
- --endpoint=unix://csi/csi.sock
- --verbose=info
env:
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: secret
mountPath: /config
- name: dev-mount-dir
mountPath: /dev
mountPropagation: Bidirectional
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
mountPropagation: Bidirectional
- name: host
mountPath: /host
mountPropagation: Bidirectional
volumes:
- name: socket-dir
hostPath:
path: /var/lib/kubelet/plugins_registry/io.edgefs.csi.iscsi
type: DirectoryOrCreate
- name: registration-dir
hostPath:
path: /var/lib/kubelet/plugins_registry/
type: Directory
- name: pods-mount-dir
hostPath:
path: /var/lib/kubelet/pods
type: Directory
- name: dev-mount-dir
hostPath:
path: /dev
type: Directory
- name: host
hostPath:
path: /
type: Directory
- name: secret
secret:
secretName: edgefs-iscsi-csi-driver-config
---
@@ -1,43 +0,0 @@
# This YAML file contains nginx & csi cinder driver objects,
# which are necessary to run nginx with csi cinder driver.
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: csi-edgefs-iscsi-sc
provisioner: io.edgefs.csi.iscsi
parameters:
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: csi-edgefs-iscsi-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
storageClassName: csi-edgefs-iscsi-sc
---
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- image: nginx
imagePullPolicy: IfNotPresent
name: nginx
ports:
- containerPort: 80
protocol: TCP
volumeMounts:
- mountPath: /var/lib/www/html
name: csi-data-nedgeplugin
volumes:
- name: csi-data-nedgeplugin
persistentVolumeClaim:
claimName: csi-edgefs-iscsi-pvc
readOnly: false
@@ -1,55 +0,0 @@
# This YAML file contains nginx & Edgfefs ISCSI ISCSI driver objects,
# which are necessary to run nginx with edgefs ISCSI csi driver.
apiVersion: v1
kind: PersistentVolume
metadata:
name: edgefs-iscsi-csi-pv
labels:
name: edgefs-iscsi-csi-pv
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 1Gi
csi:
driver: io.edgefs.csi.iscsi
volumeHandle: cltest/test/bk1/lun1
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: edgefs-iscsi-csi-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
selector:
matchExpressions:
- key: name
operator: In
values: ["edgefs-iscsi-csi-pv"]
---
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- image: maersk/nginx
imagePullPolicy: Always
name: nginx
ports:
- containerPort: 80
protocol: TCP
volumeMounts:
- mountPath: /var/www
name: edgefs-iscsi-csi-volume
volumes:
- name: edgefs-iscsi-csi-volume
persistentVolumeClaim:
claimName: edgefs-iscsi-csi-pvc
@@ -1,9 +0,0 @@
apiVersion: snapshot.storage.k8s.io/v1alpha1
kind: VolumeSnapshot
metadata:
name: snap1
spec:
snapshotClassName: edgefs-iscsi-csi-snapshot-class
source:
name: edgefs-iscsi-csi-pvc
kind: PersistentVolumeClaim
@@ -1,69 +0,0 @@
# Nginx pod with a new volume pre-populated with data from a snapshot object using Edgefs ISCSI CSI driver
#
# $ kubectl apply -f csi/iscsi/examples/snapshots/nginx-snapshot-clone-volume.yaml
#
# --------------------------------------
# Edgefs ISCSI CSI Driver - Storage Class
# --------------------------------------
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: edgefs-iscsi-csi-driver-storageclass
provisioner: io.edgefs.csi.iscsi
parameters:
cluster: cltest # to overwrite 'cluster' in driver's config secret
tenant: test # to overwrite 'tenant' in driver's config secret
bucket: bk1 # to overwrite 'bucket' in driver's config secret
object: lun1
---
# ------------------------------------------------------------------------------------------
# Edgefs ISCSI CSI Driver - Persistent Volume Claim - pre-populated with data from a snapshot
# ------------------------------------------------------------------------------------------
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: edgefs-iscsi-csi-driver-nginx-snapshot-pvc
spec:
storageClassName: edgefs-iscsi-csi-driver-storageclass
dataSource:
kind: VolumeSnapshot
apiGroup: snapshot.storage.k8s.io
name: snap1 # snapshots created by ./take-snapshot.yaml
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
---
# ---------
# Nginx pod
# ---------
apiVersion: v1
kind: Pod
metadata:
name: nginx-persistent-volume-clone
spec:
containers:
- image: nginx
imagePullPolicy: IfNotPresent
name: nginx
ports:
- containerPort: 80
protocol: TCP
volumeMounts:
- mountPath: /usr/share/nginx/html
name: edgefs-iscsi-csi-volume
volumes:
- name: edgefs-iscsi-csi-volume
persistentVolumeClaim:
claimName: edgefs-iscsi-csi-driver-nginx-snapshot-pvc
readOnly: false
@@ -1,13 +0,0 @@
# Create a new snapshot class
#
# !!! Make sure to run nginx-persistent-volume.yaml before running this example
#
# $ kubectl apply -f csi/iscsi/examples/snapshots/snapshot-class.yaml
#
apiVersion: snapshot.storage.k8s.io/v1alpha1
kind: VolumeSnapshotClass
metadata:
name: edgefs-iscsi-csi-snapshot-class
snapshotter: io.edgefs.csi.iscsi
# parameters:
@@ -1,17 +0,0 @@
# edgefs-nfs-csi-driver config file to create k8s secret
#
# $ kubectl create secret generic edgefs-nfs-csi-driver-config --from-file=./edgefs-nfs-csi-driver-config.yaml
#
#Edgefs k8s cluster options
k8sEdgefsNamespaces: ["rook-edgefs"] # element 0 is a default edgefs cluster namespace, add more when needed
k8sEdgefsMgmtPrefix: rook-edgefs-mgr # edgefs cluster management prefix
#Edgefs csi operatins options
cluster: cltest #substitution edgefs cluster name for csi operations
tenant: test #substitution edgefs tenant name for csi operations
#serviceFilter: "nfs01" #List of comma delimited allowed service names to filter
# Edgefs connection options
username: admin #edgefs k8s cluster grpc connection username
password: admin #edgefs k8s cluster grpc connection password
@@ -1,335 +0,0 @@
# Edgefs NFS CSI Driver (master)
#
# This driver version works with Kubernetes version >=1.13
#
# In production, each CSI driver deployment has to be customized to avoid conflicts,
# use non-default namespace and different names for non-namespaced entities like the ClusterRole
#
# Before installation, make sure "csidrivers" and "csinodeinfos" resource types exist:
# $ kubectl create -f https://raw.githubusercontent.com/kubernetes/csi-api/ce972859c46136a1f4a9fe119d05482a739c6311/pkg/crd/manifests/csidriver.yaml
# $ kubectl create -f https://raw.githubusercontent.com/kubernetes/csi-api/ce972859c46136a1f4a9fe119d05482a739c6311/pkg/crd/manifests/csinodeinfo.yaml
#
# Install to Kubernetes:
# $ kubectl apply -f deploy/kubernetes/edgefs-nfs-csi-driver.yaml
#
# ----------------------
# Edgefs NFS CSI Driver
# ----------------------
apiVersion: csi.storage.k8s.io/v1alpha1
kind: CSIDriver
metadata:
name: io.edgefs.csi.nfs
spec:
attachRequired: false
podInfoOnMountVersion: ''
---
# ---------------------------------
# Edgefs NFS CSI Controller Server
# ---------------------------------
#
# Runs single driver controller server (driver + provisioner + attacher + snapshotter) on one of the nodes
#
apiVersion: v1
kind: ServiceAccount
metadata:
name: edgefs-nfs-csi-controller-service-account
namespace: default # replace with non-default namespace name if needed
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: edgefs-nfs-csi-controller-cluster-role
rules:
- apiGroups: ['']
resources: ['secrets']
verbs: ['get', 'list']
- apiGroups: ['']
resources: ['persistentvolumes']
verbs: ['get', 'list', 'watch', 'create', 'update', 'delete'] # "update" for attacher
- apiGroups: ['']
resources: ['persistentvolumeclaims']
verbs: ['get', 'list', 'watch', 'update']
- apiGroups: ['storage.k8s.io']
resources: ['storageclasses']
verbs: ['get', 'list', 'watch']
- apiGroups: ['']
resources: ['events']
verbs: ['list', 'watch', 'create', 'update', 'patch']
- apiGroups: ['snapshot.storage.k8s.io']
resources: ['volumesnapshots']
verbs: ['get', 'list']
- apiGroups: ['snapshot.storage.k8s.io']
resources: ['volumesnapshotcontents']
verbs: ['get', 'list']
- apiGroups: [""]
resources: ["services"]
verbs: ["get", "list", "watch", "update"]
# attacher specific
- apiGroups: ['']
resources: ['nodes']
verbs: ['get', 'list', 'watch']
- apiGroups: ['csi.storage.k8s.io']
resources: ['csinodeinfos']
verbs: ['get', 'list', 'watch']
- apiGroups: ['storage.k8s.io']
resources: ['volumeattachments']
verbs: ['get', 'list', 'watch', 'update']
# snapshotter specific
- apiGroups: ['snapshot.storage.k8s.io']
resources: ['volumesnapshotclasses']
verbs: ['get', 'list', 'watch']
- apiGroups: ['snapshot.storage.k8s.io']
resources: ['volumesnapshotcontents']
verbs: ['create', 'get', 'list', 'watch', 'update', 'delete']
- apiGroups: ['snapshot.storage.k8s.io']
resources: ['volumesnapshots']
verbs: ['get', 'list', 'watch', 'update']
- apiGroups: ['apiextensions.k8s.io']
resources: ['customresourcedefinitions']
verbs: ['create', 'list', 'watch', 'delete']
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: edgefs-nfs-csi-controller-cluster-role-binding
subjects:
- kind: ServiceAccount
name: edgefs-nfs-csi-controller-service-account
namespace: default # replace with non-default namespace name if needed
roleRef:
kind: ClusterRole
name: edgefs-nfs-csi-controller-cluster-role
apiGroup: rbac.authorization.k8s.io
---
kind: Service
apiVersion: v1
metadata:
name: edgefs-nfs-csi-controller
labels:
app: edgefs-nfs-csi-controller
spec:
selector:
app: edgefs-nfs-csi-controller
ports:
- name: dummy
port: 12345
---
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: edgefs-nfs-csi-controller
spec:
selector:
matchLabels:
app: edgefs-nfs-csi-controller
serviceName: edgefs-nfs-csi-controller
replicas: 1
template:
metadata:
labels:
app: edgefs-nfs-csi-controller
spec:
serviceAccount: edgefs-nfs-csi-controller-service-account
containers:
# csi-provisioner: sidecar container that watches Kubernetes PersistentVolumeClaim objects
# and triggers CreateVolume/DeleteVolume against a CSI endpoint
- name: csi-provisioner
image: quay.io/k8scsi/csi-provisioner:v1.0.1
imagePullPolicy: IfNotPresent
args:
- --connection-timeout=25s
- --provisioner=io.edgefs.csi.nfs
- --csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy
# csi-attacher: sidecar container that watches Kubernetes VolumeAttachment objects
# and triggers ControllerPublish/Unpublish against a CSI endpoint
- name: csi-attacher
image: quay.io/k8scsi/csi-attacher:v1.0.1
imagePullPolicy: IfNotPresent
args:
- --v=3
- --csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy
# Not implemented yet for NFS version of the driver
# - name: csi-snapshotter
# image: quay.io/k8scsi/csi-snapshotter:v1.0.1
# imagePullPolicy: IfNotPresent
# args:
# - --connection-timeout=25s
# - --csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock
# volumeMounts:
# - name: socket-dir
# mountPath: /var/lib/csi/sockets/pluginproxy
- name: driver
image: edgefs/edgefs-csi:latest
imagePullPolicy: Always
args:
- --role=controller
- --driverType=nfs
- --nodeid=$(KUBE_NODE_NAME)
- --endpoint=unix://csi/csi.sock
- --verbose=debug
env:
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: secret
mountPath: /config
readOnly: true
volumes:
- name: socket-dir
emptyDir:
- name: secret
secret:
secretName: edgefs-nfs-csi-driver-config
---
# ---------------------------
# Edgefs nfs CSI Node Server
# ---------------------------
#
# Runs driver node server (driver + registrar) on each node
#
apiVersion: v1
kind: ServiceAccount
metadata:
name: edgefs-nfs-csi-node-service-account
namespace: default # replace with non-default namespace name if needed
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: edgefs-nfs-csi-node-cluster-role
rules:
- apiGroups: ['']
resources: ['events']
verbs: ['get', 'list', 'watch', 'create', 'update', 'patch']
- apiGroups: [""]
resources: ["services"]
verbs: ["get", "list", "watch", "update"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: edgefs-nfs-csi-node-cluster-role-binding
subjects:
- kind: ServiceAccount
name: edgefs-nfs-csi-node-service-account
namespace: default # replace with non-default namespace name if needed
roleRef:
kind: ClusterRole
name: edgefs-nfs-csi-node-cluster-role
apiGroup: rbac.authorization.k8s.io
---
# Edgefs Node Server as a daemon
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: edgefs-nfs-csi-node
spec:
selector:
matchLabels:
app: edgefs-nfs-csi-node
template:
metadata:
labels:
app: edgefs-nfs-csi-node
spec:
serviceAccount: edgefs-nfs-csi-node-service-account
hostNetwork: true
containers:
# driver-registrar: sidecar container that:
# 1) registers the CSI driver with kubelet
# 2) adds the drivers custom NodeId to a label on the Kubernetes Node API Object
- name: driver-registrar
image: quay.io/k8scsi/csi-node-driver-registrar:v1.0.1
imagePullPolicy: IfNotPresent
args:
- --v=3
- --csi-address=/csi/csi.sock
- --kubelet-registration-path=/var/lib/kubelet/plugins_registry/io.edgefs.csi.nfs/csi.sock
env:
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: registration-dir
mountPath: /registration
- name: driver
securityContext:
privileged: true
capabilities:
add: ['SYS_ADMIN']
allowPrivilegeEscalation: true
image: edgefs/edgefs-csi:latest
imagePullPolicy: Always
args:
- --role=node
- --driverType=nfs
- --nodeid=$(KUBE_NODE_NAME)
- --endpoint=unix://csi/csi.sock
- --verbose=debug
env:
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: secret
mountPath: /config
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
mountPropagation: Bidirectional
- name: host
mountPath: /host
mountPropagation: Bidirectional
volumes:
- name: socket-dir
hostPath:
path: /var/lib/kubelet/plugins_registry/io.edgefs.csi.nfs
type: DirectoryOrCreate
- name: registration-dir
hostPath:
path: /var/lib/kubelet/plugins_registry/
type: Directory
- name: pods-mount-dir
hostPath:
path: /var/lib/kubelet/pods
type: Directory
- name: host
hostPath:
path: /
type: Directory
- name: secret
secret:
secretName: edgefs-nfs-csi-driver-config
---
@@ -1,43 +0,0 @@
# This YAML file contains nginx & csi cinder driver objects,
# which are necessary to run nginx with csi cinder driver.
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: edgefs-nfs-csi-storageclass
provisioner: io.edgefs.csi.nfs
parameters:
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: edgefs-nfs-csi-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: edgefs-nfs-csi-storageclass
---
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- image: nginx
imagePullPolicy: IfNotPresent
name: nginx
ports:
- containerPort: 80
protocol: TCP
volumeMounts:
- mountPath: /var/lib/www/html
name: edgefs-nfs-csi-volume
volumes:
- name: edgefs-nfs-csi-volume
persistentVolumeClaim:
claimName: edgefs-nfs-csi-pvc
readOnly: false
@@ -1,55 +0,0 @@
# This YAML file contains nginx & Edgfefs NFS CSI driver objects,
# which are necessary to run nginx with edgefs nfs csi driver.
apiVersion: v1
kind: PersistentVolume
metadata:
name: edgefs-nfs-csi-pv
labels:
name: edgefs-nfs-csi-pv
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 1Gi
csi:
driver: io.edgefs.csi.nfs
volumeHandle: cltest/test/pvc-0f49393d-2fbb-11e9-aeb6-002590ebe9b4
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: edgefs-nfs-csi-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
selector:
matchExpressions:
- key: name
operator: In
values: ["edgefs-nfs-csi-pv"]
---
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- image: maersk/nginx
imagePullPolicy: Always
name: nginx
ports:
- containerPort: 80
protocol: TCP
volumeMounts:
- mountPath: /var/www
name: edgefs-nfs-csi-volume
volumes:
- name: edgefs-nfs-csi-volume
persistentVolumeClaim:
claimName: edgefs-nfs-csi-pvc
@@ -1,35 +0,0 @@
apiVersion: edgefs.rook.io/v1
kind: ISCSI
metadata:
name: iscsi01 # this name has to match efscli service
namespace: rook-edgefs
spec:
#targetName:
#placement:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: rook-edgefs-nodetype
# operator: In
# values:
# - gateway
# tolerations:
# - key: node230
# operator: Exists
# podAffinity:
# podAntiAffinity:
#resources:
# limits:
# cpu: "2"
# memory: "4Gi"
# requests:
# cpu: "2"
# memory: "4Gi"
# A key value list of annotations
annotations:
# all:
# key: value
# mgr:
# prepare:
# target:
@@ -1,41 +0,0 @@
apiVersion: edgefs.rook.io/v1
kind: ISGW
metadata:
name: isgw01 # Inter-Segment Gateway service name
namespace: rook-edgefs
spec:
direction: "send+receive" # I/O flow direction: send, receive or send-receive
remoteURL: "ccow://192.168.1.43:14000" # I/O flow with destination antoher EdgeFS cluster, pointing to ISGW endpoint service
#replicationType: "initial" # Replication: initial, continuous, initial+continuous (default)
#metadataOnly: all # Replicate only metadata (all or versions), thus enable on-demand fetch at destination (ccow protocol only)
#useEncryptedTunnel: true # Enables usage of encrypted SSH tunnel (ccow protocol only)
#dynamicFetchAddr: 192.168.1.44:49600 # Override dynamic fetch service host:port (default 49678)
#localAddr: 0.0.0.0:10000 # Override endpoint listening port (default 0.0.0.0:14000)
#placement:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: rook-edgefs-nodetype
# operator: In
# values:
# - isgw
# tolerations:
# - key: node230
# operator: Exists
# podAffinity:
# podAntiAffinity:
#resources:
# limits:
# cpu: "2"
# memory: "4Gi"
# requests:
# cpu: "2"
# memory: "4Gi"
# A key value list of annotations
annotations:
# all:
# key: value
# mgr:
# prepare:
# target:
@@ -1,15 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: rook-prometheus
namespace: rook-edgefs
spec:
type: NodePort
ports:
- name: web
nodePort: 30900
port: 9090
protocol: TCP
targetPort: web
selector:
prometheus: rook-prometheus
@@ -1,53 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus
namespace: rook-edgefs
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: prometheus
rules:
- apiGroups: [""]
resources:
- nodes
- services
- endpoints
- pods
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources:
- configmaps
verbs: ["get"]
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: prometheus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: prometheus
subjects:
- kind: ServiceAccount
name: prometheus
namespace: rook-edgefs
---
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: rook-prometheus
namespace: rook-edgefs
labels:
prometheus: rook-prometheus
spec:
serviceAccountName: prometheus
serviceMonitorSelector:
matchLabels:
team: rook
resources:
requests:
memory: 400Mi
@@ -1,19 +0,0 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: rook-edgefs-mgr
namespace: rook-edgefs
labels:
team: rook
spec:
namespaceSelector:
matchNames:
- rook-edgefs
selector:
matchLabels:
app: rook-edgefs-mgr
rook_cluster: rook-edgefs
endpoints:
- port: http-metrics
path: /metrics
interval: 5s
@@ -1,35 +0,0 @@
apiVersion: edgefs.rook.io/v1
kind: NFS
metadata:
name: nfs01 # this name has to match efscli service
namespace: rook-edgefs
spec:
instances: 1
#placement:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: rook-edgefs-nodetype
# operator: In
# values:
# - gateway
# tolerations:
# - key: node230
# operator: Exists
# podAffinity:
# podAntiAffinity:
#resources:
# limits:
# cpu: "2"
# memory: "4Gi"
# requests:
# cpu: "2"
# memory: "4Gi"
# A key value list of annotations
annotations:
# all:
# key: value
# mgr:
# prepare:
# target:
@@ -1,437 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: rook-edgefs-system
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: clusters.edgefs.rook.io
spec:
group: edgefs.rook.io
names:
kind: Cluster
listKind: ClusterList
plural: clusters
singular: cluster
scope: Namespaced
version: v1
validation:
openAPIV3Schema:
properties:
spec:
properties:
edgefsImageName:
type: string
dataDirHostPath:
pattern: ^/(\S+)
type: string
devicesResurrectMode:
pattern: ^(restore|restoreZap|restoreZapWait)$
type: string
dashboard:
properties:
localAddr:
type: string
network:
properties:
serverIfName:
type: string
brokerIfName:
type: string
skipHostPrepare:
type: boolean
storage:
properties:
nodes:
items: {}
type: array
useAllDevices: {}
useAllNodes:
type: boolean
required:
- edgefsImageName
- dataDirHostPath
additionalPrinterColumns:
- name: Image
type: string
description: Edgefs target image
JSONPath: .spec.edgefsImageName
- name: HostPath
type: string
description: Directory used on the Kubernetes nodes to store Edgefs data
JSONPath: .spec.dataDirHostPath
- name: Age
type: date
JSONPath: .metadata.creationTimestamp
- name: State
type: string
description: Current State
JSONPath: .status.state
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: smbs.edgefs.rook.io
spec:
group: edgefs.rook.io
names:
kind: SMB
listKind: SMBList
plural: smbs
singular: smb
scope: Namespaced
version: v1
validation:
openAPIV3Schema:
properties:
spec:
properties:
instances:
type: integer
minimum: 1
required:
- instances
additionalPrinterColumns:
- name: Instances
type: string
description: Edgefs's service instances count
JSONPath: .spec.instances
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: nfss.edgefs.rook.io
spec:
group: edgefs.rook.io
names:
kind: NFS
listKind: NFSList
plural: nfss
singular: nfs
scope: Namespaced
version: v1
validation:
openAPIV3Schema:
properties:
spec:
properties:
instances:
type: integer
minimum: 1
required:
- instances
additionalPrinterColumns:
- name: Instances
type: string
description: Edgefs's service instances count
JSONPath: .spec.instances
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: swifts.edgefs.rook.io
spec:
group: edgefs.rook.io
names:
kind: SWIFT
listKind: SWIFTList
plural: swifts
singular: swift
scope: Namespaced
version: v1
validation:
openAPIV3Schema:
properties:
spec:
properties:
instances:
type: integer
minimum: 1
required:
- instances
additionalPrinterColumns:
- name: Instances
type: string
description: Edgefs's service instances count
JSONPath: .spec.instances
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: s3s.edgefs.rook.io
spec:
group: edgefs.rook.io
names:
kind: S3
listKind: S3List
plural: s3s
singular: s3
scope: Namespaced
version: v1
validation:
openAPIV3Schema:
properties:
spec:
properties:
instances:
type: integer
minimum: 1
required:
- instances
additionalPrinterColumns:
- name: Instances
type: string
description: Edgefs's service instances count
JSONPath: .spec.instances
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: s3xs.edgefs.rook.io
spec:
group: edgefs.rook.io
names:
kind: S3X
listKind: S3XList
plural: s3xs
singular: s3x
scope: Namespaced
version: v1
validation:
openAPIV3Schema:
properties:
spec:
properties:
instances:
type: integer
minimum: 1
required:
- instances
additionalPrinterColumns:
- name: Instances
type: string
description: Edgefs's service instances count
JSONPath: .spec.instances
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: iscsis.edgefs.rook.io
spec:
group: edgefs.rook.io
names:
kind: ISCSI
listKind: ISCSIList
plural: iscsis
singular: iscsi
scope: Namespaced
version: v1
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: isgws.edgefs.rook.io
spec:
group: edgefs.rook.io
names:
kind: ISGW
listKind: ISGWList
plural: isgws
singular: isgw
scope: Namespaced
version: v1
validation:
openAPIV3Schema:
properties:
spec:
properties:
direction:
type: string
pattern: ^(send|receive|send\+receive)$
remoteURL:
type: string
config:
type: object
properties:
server:
type: string
clients:
type: array
items:
type: string
required:
- direction
additionalPrinterColumns:
- name: Direction
type: string
description: ISGW service direction
JSONPath: .spec.direction
- name: RemoteEndpoint
type: string
description: Remote ISGW service endpoint
JSONPath: .spec.remoteURL
- name: Server
type: string
JSONPath: .spec.config.server
description: ISGW server' service name
- name: Clients
type: string
JSONPath: .spec.config.clients
description: ISGW client' service names
---
# The cluster role for managing all the cluster-specific resources in a namespace
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: rook-edgefs-cluster-mgmt
labels:
operator: rook
storage-backend: edgefs
rules:
- apiGroups: [""]
resources: ["secrets", "pods", "nodes", "services", "configmaps", "endpoints"]
verbs: ["get", "list", "watch", "patch", "create", "update", "delete"]
- apiGroups: ["apps"]
resources: ["statefulsets", "statefulsets/scale"]
verbs: ["create", "delete", "deletecollection", "patch", "update"]
- apiGroups: ["apps"]
resources: ["deployments", "daemonsets", "replicasets", "statefulsets"]
verbs: ["get", "list", "watch", "create", "update", "delete"]
---
# The role for the operator to manage resources in the system namespace
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: rook-edgefs-system
namespace: rook-edgefs-system
labels:
operator: rook
storage-backend: edgefs
rules:
- apiGroups: [""]
resources: ["pods", "nodes", "configmaps"]
verbs: ["get", "list", "watch", "patch", "create", "update", "delete"]
- apiGroups: ["apps"]
resources: ["daemonsets"]
verbs: ["get", "list", "watch", "create", "update", "delete"]
---
# The cluster role for managing the Rook CRDs
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: rook-edgefs-global
labels:
operator: rook
storage-backend: edgefs
rules:
- apiGroups: [""]
# Pod access is needed for fencing
# Node access is needed for determining nodes where mons should run
resources: ["pods", "nodes", "nodes/proxy"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: [""]
# PVs and PVCs are managed by the Rook provisioner
resources: ["events", "persistentvolumes", "persistentvolumeclaims"]
verbs: ["get", "list", "watch", "patch", "create", "update", "delete"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["batch"]
resources: ["jobs"]
verbs: ["get", "list", "watch", "create", "update", "delete"]
- apiGroups: ["edgefs.rook.io"]
resources: ["*"]
verbs: ["*"]
- apiGroups: ["rook.io"]
resources: ["*"]
verbs: ["*"]
---
# The rook system service account used by the operator, agent, and discovery pods
apiVersion: v1
kind: ServiceAccount
metadata:
name: rook-edgefs-system
namespace: rook-edgefs-system
labels:
operator: rook
storage-backend: edgefs
---
# Grant the operator, agent, and discovery agents access to resources in its own namespace
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-edgefs-system
namespace: rook-edgefs-system
labels:
operator: rook
storage-backend: edgefs
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: rook-edgefs-system
subjects:
- kind: ServiceAccount
name: rook-edgefs-system
namespace: rook-edgefs-system
---
# Grant the rook system daemons cluster-wide access to manage the Rook CRDs, PVCs, and storage classes
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-edgefs-global
labels:
operator: rook
storage-backend: edgefs
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: rook-edgefs-global
subjects:
- kind: ServiceAccount
name: rook-edgefs-system
namespace: rook-edgefs-system
---
# The deployment for the rook operator
apiVersion: apps/v1
kind: Deployment
metadata:
name: rook-edgefs-operator
namespace: rook-edgefs-system
labels:
operator: rook
storage-backend: edgefs
spec:
selector:
matchLabels:
app: rook-edgefs-operator
replicas: 1
template:
metadata:
labels:
app: rook-edgefs-operator
spec:
serviceAccountName: rook-edgefs-system
containers:
- name: rook-edgefs-operator
image: rook/edgefs:master
imagePullPolicy: "Always"
args: ["edgefs", "operator"]
env:
- name: ROOK_LOG_LEVEL
value: "INFO"
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
# Rook Discover toleration. Will tolerate all taints with all keys.
# Choose between NoSchedule, PreferNoSchedule and NoExecute:
# - name: DISCOVER_TOLERATION
# value: "NoSchedule"
# (Optional) Rook Discover toleration key. Set this to the key of the taint you want to tolerate
# - name: DISCOVER_TOLERATION_KEY
# value: "<KeyOfTheTaintToTolerate>"
@@ -1,51 +0,0 @@
---
kind: PersistentVolume
apiVersion: v1
metadata:
name: edgefs-data-0
namespace: rook-edgefs
labels:
type: local
spec:
storageClassName: local-storage
persistentVolumeReclaimPolicy: Retain
capacity:
storage: 100Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/edgefs"
---
kind: PersistentVolume
apiVersion: v1
metadata:
name: edgefs-data-1
namespace: rook-edgefs
labels:
type: local
spec:
storageClassName: local-storage
persistentVolumeReclaimPolicy: Retain
capacity:
storage: 100Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/edgefs"
---
kind: PersistentVolume
apiVersion: v1
metadata:
name: edgefs-data-2
namespace: rook-edgefs
labels:
type: local
spec:
storageClassName: local-storage
persistentVolumeReclaimPolicy: Retain
capacity:
storage: 100Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/edgefs"
@@ -1,43 +0,0 @@
apiVersion: edgefs.rook.io/v1
kind: S3
metadata:
name: s301 # this name has to match efscli service
namespace: rook-edgefs
spec:
instances: 1
#s3type: s3s # s3 (default) for path style, s3s for buckets as DNS style
#serviceType: NodePort # define ServiceType (default ClusterIP)
#externalPort: 30303 # define NodePort for HTTP port (default auto)
#secureExternalPort: 30443 # define NodePort for HTTPS port (default auto)
#port: 4500 # HTTP port (default is 9982 or 9983 for s3s)
#securePort: 4501 # HTTPS port (default is 8443 or 8444 for s3s)
#sslCertificateRef: ssl-secret
#placement:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: rook-edgefs-nodetype
# operator: In
# values:
# - gateway
# tolerations:
# - key: rook-edgefs-nodetype
# operator: Exists
# podAffinity:
# podAntiAffinity:
#resources:
# limits:
# cpu: "2"
# memory: "4Gi"
# requests:
# cpu: "2"
# memory: "4Gi"
# A key value list of annotations
# A key value list of annotations
annotations:
# all:
# key: value
# mgr:
# prepare:
# target:
@@ -1,26 +0,0 @@
apiVersion: v1
kind: Secret
metadata:
name: node185-s3payload-secret
namespace: rook-edgefs
type: Opaque
data:
cred: bm9kZTEsbm9kZTEK # aws key/secret made by a command "echo node1,node1 | base64"
---
apiVersion: v1
kind: Secret
metadata:
name: node186-s3payload-secret
namespace: rook-edgefs
type: Opaque
data:
cred: bm9kZTIsbm9kZTIK
---
apiVersion: v1
kind: Secret
metadata:
name: cluster-s3payload-secret
namespace: rook-edgefs
type: Opaque
data:
cred: Y2x1c3RlcixjbHVzdGVyCg==
@@ -1,36 +0,0 @@
apiVersion: edgefs.rook.io/v1
kind: S3X
metadata:
name: s3x01 # this name has to match efscli service
namespace: rook-edgefs
spec:
instances: 1
#sslCertificateRef: s3x-ssl-secret
#placement:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: rook-edgefs-nodetype
# operator: In
# values:
# - gateway
# tolerations:
# - key: node230
# operator: Exists
# podAffinity:
# podAntiAffinity:
#resources:
# limits:
# cpu: "2"
# memory: "4Gi"
# requests:
# cpu: "2"
# memory: "4Gi"
# A key value list of annotations
annotations:
# all:
# key: value
# mgr:
# prepare:
# target:
@@ -1,51 +0,0 @@
apiVersion: v1
kind: Secret
metadata:
name: dev.local
namespace: rook-edgefs
type: Opaque
stringData:
username: "administrator"
password: "Password!"
---
apiVersion: edgefs.rook.io/v1
kind: SMB
metadata:
name: smb01 # this name has to match efscli service
namespace: rook-edgefs
spec:
instances: 1
#ads:
# domainName: "dev.local" # AD Domain Name
# dcName: "localdc" # Preferred Domain Controller Name
# serverName: "edgefs-us-east1" # NetBIOS Name of our SMB Gateway
# userSecret: "dev.local" # The name of secret holding username and password
# nameservers: "10.200.1.19" # The comma separated list of DNS name server IPs
#placement:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: rook-edgefs-nodetype
# operator: In
# values:
# - gateway
# tolerations:
# - key: node230
# operator: Exists
# podAffinity:
# podAntiAffinity:
#resources:
# limits:
# cpu: "2"
# memory: "4Gi"
# requests:
# cpu: "2"
# memory: "4Gi"
# A key value list of annotations
annotations:
# all:
# key: value
# mgr:
# prepare:
# target:
@@ -1,9 +0,0 @@
apiVersion: v1
kind: Secret
metadata:
name: ssl-secret
namespace: rook-edgefs
type: kubernetes.io/ssl
data:
sslkey: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcEFJQkFBS0NBUUVBdDlBNTlzWlBaWmdLQXdlb1lxUkJWNWV0YUEyRDZHbjl0NEJjNVJDR0J5czBzQ1RDCk1UcXZ0Q2xlMjYzaUxpNStpQVE3eFBKbE91dW1JUHBnNDRkU1NYa216OEh0NS9wblhaOE0zTDN5YS8zVnVTRDkKdnlZTk9XR0FnMzlkRkFuSFVKaTNGem8wZ2l6QlhpRXA1ckJpYnFyd01BalhqMDVrZy9rK01tajE4Y09ZQ05wbwpIb0l3SjZJT2kzbjdjOGVucFBvZkxrQ3hPS2N1NjEyakluaFdTWS9NVzNpLzFsRkFhRjMydm1pVVh5QnRYcTltClJjdDJaMWc3SjVXNlZPVnlBbUlmWGM3RVJBNHVMY0Rtazh2aVFlK3B0ZDhlejgxbzFDMWFuaWMrWTFHU0tkNjIKdTVaWjEybm10ZzhoYm9VRFJhQzZyS3NQOHBGMytGUFhPcWhsNFFJREFRQUJBb0lCQVFDcFJLQk1KdHl3b3F6OQprMHkxNGFxbWZlL2E5UzgybEh4blFsYkpQa2tlU3VSUEhOcVRPUWJhY29wKzVBWjRIcXE0bUtWdHZRWUpsejI1CityZkViellRb1BkanRLTmZ6NURtZnZQNlJ4VDU2NXVueXNEQkNNcCt2OUgzeGc2eHlEdDZkZGVORlRXTGRxbHYKQkQwd3lkY3JNRkRVK3g5K1FXT0F3TUpNNjZrb3d6VERtVlh0aDQycXlreEs0NVlWZG4wNjRseHpXMlNabkVyMwpxM0wxL1Q3M282MTZnR1A3ejFTVUlualRCRUlLM29WZUdUaDNyc2tIQURLYVJsdldtL0xUWGRrc1hya3UvVm9oCkQwWWJwRUIybkNYL1kyb2pJZmpSUHlYb2pFRnk4b1M4WDE0V2JoUm42ZTVwdTAydFJYNEVVb0ZkSkcwUzltZjgKTFN2K05DWHRBb0dCQU9Oajc5N0wrbmExVTVXRjFrY3FkaG5SZHJuY1BZT3c3d1U1TWZkWnR2cHVTYnI5OXV3RgpkZkJNZUNXUGZ1MWplVTd5SEp5NWxoc1VDRXNEWlI2d0p5U3Byb1ZEQjBJbUZnV2N4QlNXdEhLc1VyWGtzRE93Ckw2NDdJVGZVMW81ZFpUdTliTEZqbGdHY1hUbkJpUDZUb0U0STZJU2hzemplOGJXVzJ6bi96L1c3QW9HQkFNN3cKdFlwdEE2WTJaaVZySis1dDQ2N1FRdkdVRVRPYjFKa0pTS0xPZkRRL0lmVFp6RlowbnRzOVg4dkYxM2l3N3pkeQp5eTgvR213Vi9iaE10RGNYTDJqRjRUWmFMOTBzZ3kwWllmTVZmQ01TQzVQTDJYb1NVM0VKK1dDMHU2ZUZoKzBDCmcyQm5pZDIrTTYvQWdlRTlXYTBCS1drV0o1K3A2QlpidytPdFRHc1RBb0dCQUthL2MzaURSbkZrdVIyTjNydWoKUktYY045OUZ4WXBiNW51REhNUVJjeUFrWGtjVTA4enltREVXTW9rQXVJaG1pTisrcGdLOENYcGo3MHpxK1cxTwpxZlcxeExnT2xqVUk3dDlBdlgySG9sM3hSbG9Da0wvbXRLQmsxaEEyTVB5SE9xUmJYV2liNmJYV3IzcWFGTmJ5CjlQd2toalkweWRPcmtiNmpHTEpvaUZ6ZkFvR0FCNlhScjduenBwTGdGNFhzUmQxOXlwb2J2ejNQbk82blhyaC8KSExVdzFlVjNaY3NleUJzck84TDY1VmI4YlpOc1k4bzBSQnk2NXord3pyelc5Q3BCTUVnUDJLaGdtSFhxcXlJRApBcTdLbGFrM0VGRTZTazZmRXRCaGpQZGc4QUg1VWdNRHcrNVBwQWhCZEw5U2pYWnM5LzNRLy9jM282anQwTlczCldaU3YvRTBDZ1lCanMwQlpEZ0ZlU2NKSDFSVERqQ1NROWh5OEdvQVVYalYwWDZNUVJpOVJQOXRjQmMrRDVJK3IKQlBXbVJ3S3VEeTdtbFY5b3ZhODI0dk5SaU5DbGtEUlFyWjJZMVdPbkxsbDFCeVhGTUpaa3BXVUFwd1BieDNIYwpadzAwTzFOUEw1YlhNbkJBR3Z4aWRIK2JhRmpOU0FzdVhDVjdJWEtVbmM4aDAwM1MrOHI4OXc9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=
sslcert: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURQRENDQWlRQ0NRRFRoYm9mSzY1MFZ6QU5CZ2txaGtpRzl3MEJBUXNGQURCZ01Rc3dDUVlEVlFRR0V3SlYKVXpFVE1CRUdBMVVFQ0F3S1EyRnNhV1p2Y201cFlURVVNQklHQTFVRUJ3d0xVMkZ1ZEdFZ1EyeGhjbUV4RURBTwpCZ05WQkFvTUIwNWxlR1Z1ZEdFeEZEQVNCZ05WQkFNTUMyNWxlR1Z1ZEdFdVkyOXRNQjRYRFRFMk1EUXdOekF4Ck1Ea3pNbG9YRFRFNU1ERXlOakF4TURrek1sb3dZREVMTUFrR0ExVUVCaE1DVlZNeEV6QVJCZ05WQkFnTUNrTmgKYkdsbWIzSnVhV0V4RkRBU0JnTlZCQWNNQzFOaGJuUmhJRU5zWVhKaE1SQXdEZ1lEVlFRS0RBZE9aWGhsYm5SaApNUlF3RWdZRFZRUUREQXR1WlhobGJuUmhMbU52YlRDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDCkFRb0NnZ0VCQUxmUU9mYkdUMldZQ2dNSHFHS2tRVmVYcldnTmcraHAvYmVBWE9VUWhnY3JOTEFrd2pFNnI3UXAKWHR1dDRpNHVmb2dFTzhUeVpUcnJwaUQ2WU9PSFVrbDVKcy9CN2VmNloxMmZETnk5OG12OTFia2cvYjhtRFRsaApnSU4vWFJRSngxQ1l0eGM2TklJc3dWNGhLZWF3WW02cThEQUkxNDlPWklQNVBqSm85ZkhEbUFqYWFCNkNNQ2VpCkRvdDUrM1BIcDZUNkh5NUFzVGluTHV0ZG95SjRWa21QekZ0NHY5WlJRR2hkOXI1b2xGOGdiVjZ2WmtYTGRtZFkKT3llVnVsVGxjZ0ppSDEzT3hFUU9MaTNBNXBQTDRrSHZxYlhmSHMvTmFOUXRXcDRuUG1OUmtpbmV0cnVXV2RkcAo1cllQSVc2RkEwV2d1cXlyRC9LUmQvaFQxenFvWmVFQ0F3RUFBVEFOQmdrcWhraUc5dzBCQVFzRkFBT0NBUUVBClJOcmhVdkNoY2kxVjFISVZ0dlhMbVFTS1BmV1pRSmlOakxndFoyVHNSUHludUtvc2FqM1BVSWYyTndIZ2dkd3MKLy8rWUFHZHBDV21XZEljRlBEbEoxMVVUSk9sQUlxR1R5N3ZLV29EN2dKMExWdHFTVk5maEdqKzd3MHZ6b0tuYwphUVdaOURVVkFDZXBCUzdMNkQxNFV3TmhhMkdiN0NmaFdEeGM5c1A3VlFoUW1tbUhGcWtzaTRlTGxrN05Zd0ZQCkMwVW9FWWpSZnl3bTl3cjVFVXBQR1hHUW9sMTdtSUpmVEYzejYvUmFWdlBITEY3VVZxS0YvRFgraTlLci9LUWIKS2JpTGpETXJUTGgxOUQvbFArdzJNR3ZVZE5BMDByUG4vMldMdEVQNktVYWFiMGt3L05EUkY5NjBNSjJJN3Q3aApHSk8yNFdWd0l2bjZlaGVkMmdqOWZ3PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
@@ -1,6 +0,0 @@
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: local-storage
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
@@ -1,38 +0,0 @@
apiVersion: edgefs.rook.io/v1
kind: SWIFT
metadata:
name: swift01
namespace: rook-edgefs
spec:
instances: 1
#port: 4500 # HTTP port (default is 9981)
#securePort: 4501 # HTTPS port (default is 443)
#sslCertificateRef: ssl-secret
#placement:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: rook-edgefs-nodetype
# operator: In
# values:
# - gateway
# tolerations:
# - key: rook-edgefs-nodetype
# operator: Exists
# podAffinity:
# podAntiAffinity:
#resources:
# limits:
# cpu: "2"
# memory: "4Gi"
# requests:
# cpu: "2"
# memory: "4Gi"
# A key value list of annotations
annotations:
# all:
# key: value
# mgr:
# prepare:
# target:
@@ -1,165 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: rook-edgefs-system
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: clusters.edgefs.rook.io
spec:
group: edgefs.rook.io
names:
kind: Cluster
listKind: ClusterList
plural: clusters
singular: cluster
scope: Namespaced
version: v1
versions:
- name: v1
served: true
storage: true
- name: v1beta1
served: false
storage: false
conversion:
strategy: None
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: nfss.edgefs.rook.io
spec:
group: edgefs.rook.io
names:
kind: NFS
listKind: NFSList
plural: nfss
singular: nfs
scope: Namespaced
version: v1
versions:
- name: v1
served: true
storage: true
- name: v1beta1
served: false
storage: false
conversion:
strategy: None
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: swifts.edgefs.rook.io
spec:
group: edgefs.rook.io
names:
kind: SWIFT
listKind: SWIFTList
plural: swifts
singular: swift
scope: Namespaced
version: v1
versions:
- name: v1
served: true
storage: true
- name: v1beta1
served: false
storage: false
conversion:
strategy: None
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: s3s.edgefs.rook.io
spec:
group: edgefs.rook.io
names:
kind: S3
listKind: S3List
plural: s3s
singular: s3
scope: Namespaced
version: v1
versions:
- name: v1
served: true
storage: true
- name: v1beta1
served: false
storage: false
conversion:
strategy: None
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: s3xs.edgefs.rook.io
spec:
group: edgefs.rook.io
names:
kind: S3X
listKind: S3XList
plural: s3xs
singular: s3x
scope: Namespaced
version: v1
versions:
- name: v1
served: true
storage: true
- name: v1beta1
served: false
storage: false
conversion:
strategy: None
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: iscsis.edgefs.rook.io
spec:
group: edgefs.rook.io
names:
kind: ISCSI
listKind: ISCSIList
plural: iscsis
singular: iscsi
scope: Namespaced
version: v1
versions:
- name: v1
served: true
storage: true
- name: v1beta1
served: false
storage: false
conversion:
strategy: None
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: isgws.edgefs.rook.io
spec:
group: edgefs.rook.io
names:
kind: ISGW
listKind: ISGWList
plural: isgws
singular: isgw
scope: Namespaced
version: v1
versions:
- name: v1
served: true
storage: true
- name: v1beta1
served: false
storage: false
conversion:
strategy: None
-37
View File
@@ -1,37 +0,0 @@
/*
Copyright 2018 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package edgefs
import (
"github.com/coreos/pkg/capnslog"
"github.com/spf13/cobra"
)
//Cmd is the main command for edgefs operator and daemons
var Cmd = &cobra.Command{
Use: "edgefs",
Short: "Main command for edgefs operator and daemons.",
Hidden: false,
}
var (
logger = capnslog.NewPackageLogger("github.com/rook/rook", "edgefscmd")
)
func init() {
Cmd.AddCommand(operatorCmd)
Cmd.AddCommand(startCmd)
}
-56
View File
@@ -1,56 +0,0 @@
/*
Copyright 2018 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package edgefs
import (
"github.com/rook/rook/cmd/rook/rook"
edgefsoperator "github.com/rook/rook/pkg/operator/edgefs"
"github.com/rook/rook/pkg/util/flags"
"github.com/spf13/cobra"
)
const containerName = "rook-edgefs-operator"
var operatorCmd = &cobra.Command{
Use: "operator",
Short: "Runs the EdgeFS operator to deploy and manage in kubernetes clusters",
Long: `Runs the EdgeFS operator to deploy and manage in kubernetes clusters.
https://github.com/rook/rook`,
}
func init() {
flags.SetFlagsFromEnv(operatorCmd.Flags(), rook.RookEnvVarPrefix)
operatorCmd.RunE = startOperator
}
func startOperator(cmd *cobra.Command, args []string) error {
rook.SetLogLevel()
rook.LogStartupInfo(operatorCmd.Flags())
logger.Infof("Starting EdgeFS operator")
context := rook.NewContext()
rookImage := rook.GetOperatorImage(context.Clientset, containerName)
serviceAccountName := rook.GetOperatorServiceAccount(context.Clientset)
// Using the current image version to deploy other rook pods
op := edgefsoperator.New(context, rookImage, serviceAccountName)
err := op.Run()
rook.TerminateOnError(err, "failed to run operator")
return nil
}
-50
View File
@@ -1,50 +0,0 @@
/*
Copyright 2018 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package edgefs
import (
"github.com/rook/rook/cmd/rook/rook"
"github.com/rook/rook/pkg/util/exec"
"github.com/rook/rook/pkg/util/flags"
"github.com/spf13/cobra"
)
const (
edgefStartCmdPath = "/opt/nedge/sbin/edgefs-start.sh"
)
var startCmd = &cobra.Command{
Use: "start",
Short: "Starts edgefs-start.sh on target node",
Long: `Starts edgefs-start.sh on target node`,
}
func init() {
flags.SetFlagsFromEnv(startCmd.Flags(), rook.RookEnvVarPrefix)
startCmd.RunE = start
}
func start(cmd *cobra.Command, args []string) error {
rook.SetLogLevel()
rook.LogStartupInfo(operatorCmd.Flags())
executor := &exec.CommandExecutor{}
err := executor.ExecuteCommand(edgefStartCmdPath, args...)
logger.Infof("Start script %s exited: %+v", edgefStartCmdPath, err)
return nil
}
-2
View File
@@ -20,7 +20,6 @@ import (
"github.com/rook/rook/cmd/rook/cassandra"
"github.com/rook/rook/cmd/rook/ceph"
"github.com/rook/rook/cmd/rook/edgefs"
"github.com/rook/rook/cmd/rook/nfs"
rook "github.com/rook/rook/cmd/rook/rook"
"github.com/rook/rook/cmd/rook/util"
@@ -41,7 +40,6 @@ func addCommands() {
discoverCmd,
// backend commands
ceph.Cmd,
edgefs.Cmd,
nfs.Cmd,
cassandra.Cmd,
yugabytedb.Cmd,
+4 -66
View File
@@ -14,20 +14,13 @@ providers network access.
To achieve non-flat networking model, Rook can choose to enable `hostNetwork`
and expose host network interfaces to Storage Provider pods.
EdgeFS Rook cluster network definition example:
```yaml
network: # cluster level networking configuration aka hostNetwork
serverIfName: enp2s0f0
brokerIfName: enp2s0f0
```
Ceph Rook cluster network definition example:
```yaml
network:
hostNetwork: true
```
Both EdgeFS and Ceph operators without specifying this configuration will always
The Ceph operator without specifying this configuration will always
default to pod networking.
## Proposed Design
@@ -63,9 +56,9 @@ kubernetes cluster default networking.
### Keys
The key for each interface key-value pairs are left to each storage providers to
decide. Having network interface selector with key value `server` and `broker`
makes more sense for EdgeFS storage provider while Ceph will have `public` and
`cluster`.
decide. The network interface selectors with key values `public` and
`cluster` are specified for Ceph, while other storage providers can define their
own key names if desired.
### Network Interface Selector
@@ -83,61 +76,6 @@ implementation has extra features not covered by the standard such as
## Example Configurations
### EdgeFS Rook Cluster Network definition example
1. Default networking
```yaml
# network:
# provider: <network-provider>
# interfaces:
# <key>: <network-interface-selector>
# <key>: <network-interface-selector>
```
2. Host network provider
```yaml
network:
provider: host
interfaces:
server: eth0
broker: eth0
```
3. Multus network provider
```yaml
network:
provider: multus
interfaces:
server: flannel # defaults to net1 interface
broker: flannel # defaults to net2 interface
```
The issue with this configuration is that `netx` interface name is given in the
order they are applied by multus. No sure way to know if it means both keys to
use the same network and interface, or in different interfaces just by the
configuration alone.
4. Multus network provider with JSON selector
```yaml
network:
provider: multus
interfaces:
server: '{
"name": "flannel",
"namespace": "rook-edgefs",
"interface": "flannel1"
}'
broker: '{
"name": "flannel",
"namespace": "rook-edgefs",
"interface": "flannel2"
}'
```
### Ceph Rook Cluster Network definition example
<!--TODO-->
-3
View File
@@ -29,9 +29,6 @@ cross.%:
ceph.%:
@$(MAKE) -C ceph PLATFORM=$*
edgefs.%:
@$(MAKE) -C edgefs PLATFORM=$*
nfs.%:
@$(MAKE) -C nfs PLATFORM=$*
-20
View File
@@ -1,20 +0,0 @@
# Copyright 2018 The Rook Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM edgefs/edgefs:1.0.0
ADD rook /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/rook"]
CMD [""]
-47
View File
@@ -1,47 +0,0 @@
# Copyright 2018 The Rook Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
include ../image.mk
# ====================================================================================
# Image Build Options
EDGEFS_IMAGE = $(BUILD_REGISTRY)/edgefs-$(GOARCH)
IMAGES = $(EDGEFS_IMAGE)
TEMP := $(shell mktemp -d)
# ====================================================================================
# Build Rook EdgeFS
# since this is a leaf image we avoid leaving around a lot of dangling images
# by removing the last build of the final edgefs image
OLD_IMAGE_ID := $(shell $(DOCKERCMD) images -q $(EDGEFS_IMAGE))
CURRENT_IMAGE_ID := $$($(DOCKERCMD) images -q $(EDGEFS_IMAGE))
IMAGE_FILENAME := $(IMAGE_OUTPUT_DIR)/edgefs.tar.gz
do.build:
@echo === container build $(EDGEFS_IMAGE)
@cp Dockerfile $(TEMP)
@cp $(OUTPUT_DIR)/bin/linux_$(GOARCH)/rook $(TEMP)
@$(DOCKERCMD) build $(BUILD_ARGS) \
-t $(EDGEFS_IMAGE) \
$(TEMP)
@[ "$(OLD_IMAGE_ID)" != "$(CURRENT_IMAGE_ID)" ] && [ -n "$(OLD_IMAGE_ID)" ] && $(DOCKERCMD) rmi $(OLD_IMAGE_ID) || true
@if [ ! -e "$(IMAGE_FILENAME)" ] || [ "$(OLD_IMAGE_ID)" != "$(CURRENT_IMAGE_ID)" ] || [ -n "$(OLD_IMAGE_ID)" ]; then \
echo === saving image $(EDGEFS_IMAGE); \
mkdir -p $(IMAGE_OUTPUT_DIR); \
$(DOCKERCMD) save $(EDGEFS_IMAGE) | gzip -c > $(IMAGE_FILENAME); \
fi
@rm -fr $(TEMP)
-5
View File
@@ -1,5 +0,0 @@
package edgefsrookio
const (
CustomResourceGroupName = "edgefs.rook.io"
)
-36
View File
@@ -1,36 +0,0 @@
/*
Copyright 2019 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
import (
rook "github.com/rook/rook/pkg/apis/rook.io/v1"
)
// GetPrepareAnnotations returns the Annotations for the prepare service
func GetPrepareAnnotations(a rook.AnnotationsSpec) rook.Annotations {
return a.All().Merge(a[KeyPrepare])
}
// GetMgrAnnotations returns the Annotations for the MGR service
func GetMgrAnnotations(a rook.AnnotationsSpec) rook.Annotations {
return a.All().Merge(a[KeyMgr])
}
// GetTargetAnnotations returns the Annotations for the target service
func GetTargetAnnotations(a rook.AnnotationsSpec) rook.Annotations {
return a.All().Merge(a[KeyTarget])
}
-152
View File
@@ -1,152 +0,0 @@
/*
Copyright 2019 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
import (
"fmt"
)
const (
DeploymentRtlfs = "rtlfs"
DeploymentRtrd = "rtrd"
DeploymentAutoRtlfs = "autoRtlfs"
DeploymentRtkvs = "rtkvs"
)
type ClusterDeploymentConfig struct {
DeploymentType string //rtlfs, rtrd, autortlfs
TransportKey string //rtlfs or rtrd
Directories []RtlfsDevice //cluster wide directories
DevConfig map[string]DevicesConfig
NeedPrivileges bool
}
// GetRtlfsDevices returns array of Rtlfs devices in cluster,
// Rtlfs devices must be the same over the cluster configuration,
// so we can get first non gateway deviceConfig
func (deploymentConfig *ClusterDeploymentConfig) GetRtlfsDevices() []RtlfsDevice {
rtlfsDevices := make([]RtlfsDevice, 0)
for _, devConfig := range deploymentConfig.DevConfig {
if !devConfig.IsGatewayNode {
return devConfig.Rtlfs.Devices
}
}
return rtlfsDevices
}
func (deploymentConfig *ClusterDeploymentConfig) GetRtkvsDevicesCount() int {
rtkvsDevicesCount := 0
for _, devConfig := range deploymentConfig.DevConfig {
if devConfig.IsGatewayNode {
continue
}
rtkvsDevicesCount += len(devConfig.Rtkvs.Devices)
}
return rtkvsDevicesCount
}
func (deploymentConfig *ClusterDeploymentConfig) GetRtrdDevicesCount() int {
rtrdsDevicesCount := 0
for _, devConfig := range deploymentConfig.DevConfig {
if devConfig.IsGatewayNode {
continue
}
rtrdsDevicesCount += len(devConfig.Rtrd.Devices)
for _, slave := range devConfig.RtrdSlaves {
rtrdsDevicesCount += len(slave.Devices)
}
}
return rtrdsDevicesCount
}
func (deploymentConfig *ClusterDeploymentConfig) GetTargetsCount() int {
targets := 0
for _, devConfig := range deploymentConfig.DevConfig {
if devConfig.IsGatewayNode {
continue
}
targets++
}
return targets
}
func (deploymentConfig *ClusterDeploymentConfig) GetRtrdContainersCount() int {
containers := 0
for _, devConfig := range deploymentConfig.DevConfig {
if devConfig.IsGatewayNode {
continue
}
// 1 is main target container
containers += 1 + len(devConfig.RtrdSlaves)
}
return containers
}
func (deploymentConfig *ClusterDeploymentConfig) CompatibleWith(newConfig ClusterDeploymentConfig) (bool, error) {
if deploymentConfig.DeploymentType != newConfig.DeploymentType {
return false, fmt.Errorf("DeploymentType `%s` != `%s` for updated cluster configuration", deploymentConfig.DeploymentType, newConfig.DeploymentType)
}
if deploymentConfig.TransportKey != newConfig.TransportKey {
return false, fmt.Errorf("TransportKey `%s` != `%s` for updated cluster configuration", deploymentConfig.TransportKey, newConfig.TransportKey)
}
return true, nil
}
// NodesDifference produces A\B for set of node names
// In case of
// A: existing cluster configuration
// B: updated cluster configuration
// A\B -> nodes to delete from cluster
// B\A -> nodes to add to cluster
func (deploymentConfig *ClusterDeploymentConfig) NodesDifference(B ClusterDeploymentConfig) []string {
difference := make([]string, 0)
for nodeName := range deploymentConfig.DevConfig {
if _, ok := B.DevConfig[nodeName]; !ok {
difference = append(difference, nodeName)
}
}
return difference
}
type DevicesConfig struct {
Rtrd RTDevices
RtrdSlaves []RTDevices
Rtlfs RtlfsDevices
Rtkvs RtkvsDevices
Zone int
IsGatewayNode bool
}
// GetRtrdDeviceCount returns all rtrd's devices count on specific node
func (dc *DevicesConfig) GetRtrdDeviceCount() int {
count := len(dc.Rtrd.Devices)
if count > 0 {
for _, rtrdSlave := range dc.RtrdSlaves {
count += len(rtrdSlave.Devices)
}
}
return count
}
type DevicesResurrectOptions struct {
NeedToResurrect bool
NeedToZap bool
NeedToWait bool
SlaveContainers int
}
-140
View File
@@ -1,140 +0,0 @@
/*
Copyright 2019 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
type RTDevices struct {
Devices []RTDevice `json:"devices"`
}
type RTDevice struct {
Name string `json:"name,omitempty"`
Device string `json:"device,omitempty"`
Psize int `json:"psize,omitempty"`
MdPsize int `json:"mdpsize,omitempty"`
MDReserved int `json:"mdcache_reserved,omitempty"`
HDDReadAhead int `json:"hdd_readahead,omitempty"`
VerifyChid int `json:"verify_chid"`
Journal string `json:"journal,omitempty"`
Metadata string `json:"metadata,omitempty"`
Bcache int `json:"bcache,omitempty"`
BcacheWritearound int `json:"bcache_writearound"`
PlevelOverride int `json:"plevel_override,omitempty"`
Sync int `json:"sync"`
WalDisabled int `json:"wal_disabled,omitempty"`
PayloadS3URL string `json:"payload_s3_bucket_url"`
PayloadS3Region string `json:"payload_s3_region"`
PayloadS3MinKb int `json:"payload_s3_min_kb"`
PayloadS3Capacity int `json:"payload_s3_capacity"`
PayloadS3Secret string `json:"payload_s3_key_file"`
PayloadS3SyncGet int `json:"payload_s3_sync_get_max,omitempty"`
}
type RtlfsDevices struct {
Devices []RtlfsDevice `json:"devices"`
}
type RtlfsDevice struct {
Name string `json:"name"`
Path string `json:"path"`
Psize int `json:"psize,omitempty"`
Maxsize uint64 `json:"maxsize,omitempty"`
VerifyChid int `json:"verify_chid"`
PlevelOverride int `json:"plevel_override,omitempty"`
CheckMountpoint int `json:"check_mountpoint"`
Sync int `json:"sync"`
WalDisabled int `json:"wal_disabled,omitempty"`
}
type RtkvsDevices struct {
Backend string `json:"backend"`
Devices []RtkvsDevice `json:"devices"`
}
type RtkvsDevice struct {
Name string `json:"name"`
Path string `json:"path"`
JornalPath string `json:"journal"`
JournalMaxsize uint64 `json:"jenvsize,omitempty"`
VerifyChid int `json:"verify_chid"`
PlevelOverride int `json:"plevel_override,omitempty"`
Sync int `json:"sync"`
WalDisabled int `json:"wal_disabled,omitempty"`
}
type CcowTenant struct {
FailureDomain int `json:"failure_domain"`
ReplicationCount int `json:"replication_count,omitempty"`
SyncPut int `json:"sync_put,omitempty"`
SyncPutNamed int `json:"sync_put_named"`
CommitWait int `json:"sync_put_commit_wait"`
ChunkSize int `json:"chunkmap_chunk_size,omitempty"`
}
type CcowNetwork struct {
BrokerInterfaces string `json:"broker_interfaces"`
ServerUnixSocket string `json:"server_unix_socket"`
BrokerIP4addr string `json:"broker_ip4addr,omitempty"`
ServerIP4addr string `json:"server_ip4addr,omitempty"`
NoIP4Frag int `json:"no_ipfrag,omitempty"`
}
type CcowTrlog struct {
Interval int `json:"interval,omitempty"`
Quarantine int `json:"quarantine,omitempty"`
}
type CcowConf struct {
Trlog CcowTrlog `json:"trlog,omitempty"`
Tenant CcowTenant `json:"tenant"`
Network CcowNetwork `json:"network"`
}
type CcowdNetwork struct {
ServerInterfaces string `json:"server_interfaces"`
ServerUnixSocket string `json:"server_unix_socket"`
ServerIP4addr string `json:"server_ip4addr,omitempty"`
NoIP4Frag int `json:"no_ipfrag,omitempty"`
}
type CcowdBgConfig struct {
TrlogDeleteAfterHours int `json:"trlog_delete_after_hours,omitempty"`
SpeculativeBackrefTimeout int `json:"speculative_backref_timeout,omitempty"`
}
type CcowdConf struct {
BgConfig CcowdBgConfig `json:"repdev_bg_config,omitempty"`
Zone int `json:"zone,omitempty"`
Network CcowdNetwork `json:"network"`
Transport []string `json:"transport"`
}
type AuditdConf struct {
IsAggregator int `json:"is_aggregator"`
}
type SetupNode struct {
Ccow CcowConf `json:"ccow"`
Ccowd CcowdConf `json:"ccowd"`
Auditd AuditdConf `json:"auditd"`
Ipv4Autodetect int `json:"ipv4_autodetect,omitempty"`
RtlfsAutodetect string `json:"rtlfs_autodetect,omitempty"`
ClusterNodes []string `json:"cluster_nodes,omitempty"`
Rtrd RTDevices `json:"rtrd"`
RtrdSlaves []RTDevices `json:"rtrdslaves"`
Rtlfs RtlfsDevices `json:"rtlfs"`
Rtkvs RtkvsDevices `json:"rtkvs"`
NodeType string `json:"nodeType"`
}
-21
View File
@@ -1,21 +0,0 @@
/*
Copyright 2019 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package,register
// Package v1 is the v1 version of the API.
// +groupName=edgefs.rook.io
package v1
-23
View File
@@ -1,23 +0,0 @@
/*
Copyright 2019 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
const (
KeyPrepare = "prepare"
KeyMgr = "mgr"
KeyTarget = "target"
)
-35
View File
@@ -1,35 +0,0 @@
/*
Copyright 2019 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
import (
rookv1 "github.com/rook/rook/pkg/apis/rook.io/v1"
)
// GetMgrPlacement returns the placement for the MGR service
func GetMgrPlacement(p rookv1.PlacementSpec) rookv1.Placement {
return p.All().Merge(p[KeyMgr])
}
// GetTargetPlacement returns the placement for the Target service
func GetTargetPlacement(p rookv1.PlacementSpec) rookv1.Placement {
return p.All().Merge(p[KeyTarget])
}
// GetPreparePlacement returns the placement for the Host Prepare service
func GetPreparePlacement(p rookv1.PlacementSpec) rookv1.Placement {
return p.All().Merge(p[KeyPrepare])
}
-75
View File
@@ -1,75 +0,0 @@
/*
Copyright 2019 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
edgefsrookio "github.com/rook/rook/pkg/apis/edgefs.rook.io"
)
const (
CustomResourceGroup = "edgefs.rook.io"
Version = "v1"
)
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: edgefsrookio.CustomResourceGroupName, Version: Version}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
var (
// SchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
SchemeBuilder runtime.SchemeBuilder
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
func init() {
// We only register manually written functions here. The registration of the
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder.Register(addKnownTypes)
}
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Cluster{},
&ClusterList{},
&NFS{},
&NFSList{},
&SMB{},
&SMBList{},
&S3{},
&S3List{},
&SWIFT{},
&SWIFTList{},
&S3X{},
&S3XList{},
&ISCSI{},
&ISCSIList{},
&ISGW{},
&ISGWList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}
-170
View File
@@ -1,170 +0,0 @@
/*
Copyright 2019 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
import (
"strconv"
rook "github.com/rook/rook/pkg/apis/rook.io/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
)
const (
ResourcesKeyMgr = "mgr"
ResourcesKeyTarget = "target"
hostLocalTimeVolName = "host-local-time"
hostLocalTimePath = "/etc/localtime"
hostTimeZoneVolName = "host-time-zone"
hostTimeZonePath = "/etc/timezone"
)
// GetMgrResources returns the placement for the MGR service
func GetMgrResources(p rook.ResourceSpec) v1.ResourceRequirements {
return p[ResourcesKeyMgr]
}
// GetTargetResources returns the placement for the Targets
func GetTargetResources(p rook.ResourceSpec) v1.ResourceRequirements {
return p[ResourcesKeyTarget]
}
// GetInitiatorEnvArr returns array of EnvVar for all the Initiator based
// on configured resources and its profile
func GetInitiatorEnvArr(svctype string, embedded bool, chunkCacheSize resource.Quantity, resources v1.ResourceRequirements) []v1.EnvVar {
retArr := []v1.EnvVar{}
rMemLim := resources.Limits.Memory()
if !rMemLim.IsZero() {
// adjust chunk cache maximum size
cacheSize := rMemLim.Value() * 75 / 100
if embedded {
// embedded default case, 100mb
cacheSize = 100 * 1024 * 1024
}
if !chunkCacheSize.IsZero() && chunkCacheSize.CmpInt64(cacheSize) < 0 {
// user wants to set custom cache size
// It might be lowered below
cacheSize = chunkCacheSize.Value()
}
if svctype == "target" {
// adjust target's built-in cgroup
cgroupTgt := rMemLim.Value() * 95 / 100
if cgroupTgt <= cacheSize {
// in targets case chunk cache only needed for
// background operations. This was probably not
// a user's intent, so adjust to a much lower values
cacheSize = cgroupTgt / 8
}
retArr = append(retArr, v1.EnvVar{
Name: "CCOWD_CGROUP_MEMLIM",
Value: strconv.FormatInt(cgroupTgt, 10),
})
} else if svctype == "isgw" {
// ISGW doesn't need large chunk cache
cacheSize = rMemLim.Value() * 25 / 100
} else if svctype == "s3" || svctype == "swift" {
// adjust restapi's node.js GC settings. This memory
// will be shared among all the HTTP worker processes
// and will be used to calculate optimal # of workers too.
svcMem := rMemLim.Value() * 95 / 100
if svcMem <= cacheSize {
cacheSize = svcMem / 2
}
retArr = append(retArr, v1.EnvVar{
Name: "SVC_MEM_LIMIT",
Value: strconv.FormatInt(svcMem, 10),
})
svcMemPerWorker := int64(1 * 1024 * 1024 * 1024)
if embedded {
svcMemPerWorker = int64(256 * 1024 * 1024)
}
if svcMem < svcMemPerWorker {
svcMemPerWorker = svcMem / 2
}
retArr = append(retArr, v1.EnvVar{
Name: "SVC_MEM_PER_WORKER",
Value: strconv.FormatInt(svcMemPerWorker, 10),
})
}
retArr = append(retArr, v1.EnvVar{
Name: "CCOW_MEMORY_LIMIT",
Value: strconv.FormatInt(cacheSize, 10),
})
}
rCpuLim := resources.Limits.Cpu()
if !rCpuLim.IsZero() {
retArr = append(retArr, v1.EnvVar{
Name: "SVC_CPU_LIMIT",
Value: strconv.FormatInt(rCpuLim.Value(), 10),
})
}
if embedded {
retArr = append(retArr, v1.EnvVar{
Name: "CCOW_EMBEDDED",
Value: "1",
})
retArr = append(retArr, v1.EnvVar{
Name: "JE_MALLOC_CONF",
Value: "tcache:false",
})
}
return retArr
}
func GetHostLocalTimeVolumeMount() v1.VolumeMount {
return v1.VolumeMount{
Name: hostLocalTimeVolName,
MountPath: hostLocalTimePath,
ReadOnly: true,
}
}
func GetHostLocalTimeVolume() v1.Volume {
return v1.Volume{
Name: hostLocalTimeVolName,
VolumeSource: v1.VolumeSource{
HostPath: &v1.HostPathVolumeSource{
Path: hostLocalTimePath,
},
},
}
}
func GetHostTimeZoneVolumeMount() v1.VolumeMount {
return v1.VolumeMount{
Name: hostTimeZoneVolName,
MountPath: hostTimeZonePath,
ReadOnly: true,
}
}
func GetHostTimeZoneVolume() v1.Volume {
return v1.Volume{
Name: hostTimeZoneVolName,
VolumeSource: v1.VolumeSource{
HostPath: &v1.HostPathVolumeSource{
Path: hostTimeZonePath,
},
},
}
}
-412
View File
@@ -1,412 +0,0 @@
/*
Copyright 2019 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
import (
rookv1 "github.com/rook/rook/pkg/apis/rook.io/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// ***************************************************************************
// IMPORTANT FOR CODE GENERATION
// If the types in this file are updated, you will need to run
// `make codegen` to generate the new types under the client/clientset folder.
// ***************************************************************************
// +genclient
// +genclient:noStatus
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type Cluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec ClusterSpec `json:"spec"`
Status ClusterStatus `json:"status,omitempty"`
}
type ClusterStatus struct {
State ClusterState `json:"state,omitempty"`
Message string `json:"message,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []Cluster `json:"items"`
}
type ClusterSpec struct {
Storage rookv1.StorageScopeSpec `json:"storage,omitempty"`
// The annotations-related configuration to add/set on each Pod related object.
Annotations rookv1.AnnotationsSpec `json:"annotations,omitempty"`
// The placement-related configuration to pass to kubernetes (affinity, node selector, tolerations).
Placement rookv1.PlacementSpec `json:"placement,omitempty"`
Network rookv1.NetworkSpec `json:"network,omitempty"`
Dashboard DashboardSpec `json:"dashboard,omitempty"`
// Resources set resource requests and limits
Resources v1.ResourceRequirements `json:"resources,omitempty"`
// The path on the host where config and data can be persisted.
DataDirHostPath string `json:"dataDirHostPath,omitempty"`
ServiceAccount string `json:"serviceAccount,omitempty"`
DataVolumeSize resource.Quantity `json:"dataVolumeSize,omitempty"`
DevicesResurrectMode string `json:"devicesResurrectMode,omitempty"`
EdgefsImageName string `json:"edgefsImageName,omitempty"`
SkipHostPrepare bool `json:"skipHostPrepare,omitempty"`
ResourceProfile string `json:"resourceProfile,omitempty"`
ChunkCacheSize resource.Quantity `json:"chunkCacheSize,omitempty"`
TrlogProcessingInterval int `json:"trlogProcessingInterval,omitempty"`
TrlogKeepDays float32 `json:"trlogKeepDays,omitempty"`
SystemReplicationCount int `json:"sysRepCount,omitempty"`
FailureDomain string `json:"failureDomain,omitempty"`
CommitNWait int `json:"commitNWait,omitempty"`
NoIP4Frag bool `json:"noIP4Frag,omitempty"`
MaxContainerCapacity resource.Quantity `json:"maxContainerCapacity,omitempty"`
UseHostLocalTime bool `json:"useHostLocalTime,omitempty"`
SysChunkSize int `json:"sysMaxChunkSize,omitempty"`
}
type DashboardSpec struct {
LocalAddr string `json:"localAddr"`
}
type ClusterState string
const (
ClusterStateCreating ClusterState = "Creating"
ClusterStateCreated ClusterState = "Created"
ClusterStateUpdating ClusterState = "Updating"
ClusterStateDeleting ClusterState = "Deleting"
ClusterStateError ClusterState = "Error"
)
// +genclient
// +genclient:noStatus
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type NFS struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec NFSSpec `json:"spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type NFSList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []NFS `json:"items"`
}
// NFSSpec represent the spec of a pool
type NFSSpec struct {
// The annotations-related configuration to add/set on each Pod related object.
Annotations rookv1.Annotations `json:"annotations,omitempty"`
// The affinity to place the NFS pods (default is to place on any available nodes in EdgeFS running namespace)
Placement rookv1.Placement `json:"placement"`
// Resources set resource requests and limits
Resources v1.ResourceRequirements `json:"resources,omitempty"`
// The number of pods in the NFS replicaset
Instances int32 `json:"instances"`
RelaxedDirUpdates bool `json:"relaxedDirUpdates,omitempty"`
ResourceProfile string `json:"resourceProfile,omitempty"`
ChunkCacheSize resource.Quantity `json:"chunkCacheSize,omitempty"`
}
// +genclient
// +genclient:noStatus
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type SMB struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec SMBSpec `json:"spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type SMBList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []SMB `json:"items"`
}
// SMBSpec represent the spec of a pool
type SMBSpec struct {
// The annotations-related configuration to add/set on each Pod related object.
Annotations rookv1.Annotations `json:"annotations,omitempty"`
// The affinity to place the SMB pods (default is to place on any available nodes in EdgeFS running namespace)
Placement rookv1.Placement `json:"placement"`
// Resources set resource requests and limits
Resources v1.ResourceRequirements `json:"resources,omitempty"`
// AD joining section
Ads AdsSpec `json:"ads,omitempty"`
// The number of pods in the SMB replicaset
Instances int32 `json:"instances"`
RelaxedDirUpdates bool `json:"relaxedDirUpdates,omitempty"`
ResourceProfile string `json:"resourceProfile,omitempty"`
ChunkCacheSize resource.Quantity `json:"chunkCacheSize,omitempty"`
}
type AdsSpec struct {
// AD Domain Name
DomainName string `json:"domainName"`
// Preferred Domain Controller Name
DcName string `json:"dcName"`
// NetBIOS Name of our SMB Gateway
ServerName string `json:"serverName"`
// The name of the secret that stores the username and password
UserSecret string `json:"userSecret"`
// Comma separated list of name servers IPv4 addresses
Nameservers string `json:"nameservers"`
}
// +genclient
// +genclient:noStatus
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type S3 struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec S3Spec `json:"spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type S3List struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []S3 `json:"items"`
}
// S3Spec represent the spec of a s3 service
type S3Spec struct {
// The annotations-related configuration to add/set on each Pod related object.
Annotations rookv1.Annotations `json:"annotations,omitempty"`
// The affinity to place the S3 pods (default is to place on any available nodes in EdgeFS running namespace)
Placement rookv1.Placement `json:"placement"`
// Resources set resource requests and limits
Resources v1.ResourceRequirements `json:"resources,omitempty"`
// The number of pods in the S3 replicaset
Instances int32 `json:"instances"`
//S3 Http port (default value 9982)
Port uint `json:"port,omitempty"`
//S3 Https port (default value 9443)
SecurePort uint `json:"securePort,omitempty"`
// Service type to expose (default value ClusterIP)
ServiceType string `json:"serviceType,omitempty"`
// S3 Http external port
ExternalPort uint `json:"externalPort,omitempty"`
// S3 Https external port
SecureExternalPort uint `json:"secureExternalPort,omitempty"`
// The name of the secret that stores the ssl certificate for secure s3 connections
SSLCertificateRef string `json:"sslCertificateRef,omitempty"`
// S3 type: s3 (bucket as url, default), s3s (bucket as DNS subdomain), s3g (new, experimental)
S3Type string `json:"s3type,omitempty"`
ResourceProfile string `json:"resourceProfile,omitempty"`
ChunkCacheSize resource.Quantity `json:"chunkCacheSize,omitempty"`
}
// +genclient
// +genclient:noStatus
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type SWIFT struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec SWIFTSpec `json:"spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type SWIFTList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []SWIFT `json:"items"`
}
// SWIFTSpec represent the spec of a swift service
type SWIFTSpec struct {
// The affinity to place the SWIFT pods (default is to place on any available nodes in EdgeFS running namespace)
Placement rookv1.Placement `json:"placement"`
// Resources set resource requests and limits
Resources v1.ResourceRequirements `json:"resources,omitempty"`
// The number of pods in the S3 replicaset
Instances int32 `json:"instances"`
//S3 Http port (default value 9982)
Port uint `json:"port,omitempty"`
//S3 Https port (default value 9443)
SecurePort uint `json:"securePort,omitempty"`
// Service type to expose (default value ClusterIP)
ServiceType string `json:"serviceType,omitempty"`
// S3 Http external port
ExternalPort uint `json:"externalPort,omitempty"`
// S3 Https external port
SecureExternalPort uint `json:"secureExternalPort,omitempty"`
// The name of the secret that stores the ssl certificate for secure s3 connections
SSLCertificateRef string `json:"sslCertificateRef,omitempty"`
ResourceProfile string `json:"resourceProfile,omitempty"`
ChunkCacheSize resource.Quantity `json:"chunkCacheSize,omitempty"`
}
// +genclient
// +genclient:noStatus
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type S3X struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec S3XSpec `json:"spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type S3XList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []S3X `json:"items"`
}
// S3XSpec represent the spec of a s3 service
type S3XSpec struct {
// The annotations-related configuration to add/set on each Pod related object.
Annotations rookv1.Annotations `json:"annotations,omitempty"`
// The affinity to place the S3X pods (default is to place on any available nodes in EdgeFS running namespace)
Placement rookv1.Placement `json:"placement"`
// Resources set resource requests and limits
Resources v1.ResourceRequirements `json:"resources,omitempty"`
// The number of pods in the S3X replicaset
Instances int32 `json:"instances"`
//S3X Http port (default value 3000)
Port uint `json:"port,omitempty"`
//S3X Https port (default value 3001)
SecurePort uint `json:"securePort,omitempty"`
// Service type to expose (default value ClusterIP)
ServiceType string `json:"serviceType,omitempty"`
// S3 Http external port
ExternalPort uint `json:"externalPort,omitempty"`
// S3 Https external port
SecureExternalPort uint `json:"secureExternalPort,omitempty"`
// The name of the secret that stores the ssl certificate for secure s3x connections
SSLCertificateRef string `json:"sslCertificateRef,omitempty"`
ResourceProfile string `json:"resourceProfile,omitempty"`
ChunkCacheSize resource.Quantity `json:"chunkCacheSize,omitempty"`
}
// +genclient
// +genclient:noStatus
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ISCSI struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec ISCSISpec `json:"spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ISCSIList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []ISCSI `json:"items"`
}
// ISCSISpec represent the spec of a iscsi service
type ISCSISpec struct {
// The annotations-related configuration to add/set on each Pod related object.
Annotations rookv1.Annotations `json:"annotations,omitempty"`
// The affinity to place the ISCSI pods (default is to place on any available nodes in EdgeFS running namespace)
Placement rookv1.Placement `json:"placement"`
// Resources set resource requests and limits
Resources v1.ResourceRequirements `json:"resources,omitempty"`
// The number of pods in the ISCSI replicaset
Instances int32 `json:"instances"`
//IISCSI Http port (default value 3000)
TargetName string `json:"targetName,omitempty"`
//specific ISCSI target parameters
TargetParams TargetParametersSpec `json:"targetParams"`
ResourceProfile string `json:"resourceProfile,omitempty"`
ChunkCacheSize resource.Quantity `json:"chunkCacheSize,omitempty"`
}
type TargetParametersSpec struct {
MaxRecvDataSegmentLength uint `json:"maxRecvDataSegmentLength"`
DefaultTime2Retain uint `json:"defaultTime2Retain"`
DefaultTime2Wait uint `json:"defaultTime2Wait"`
FirstBurstLength uint `json:"firstBurstLength"`
MaxBurstLength uint `json:"maxBurstLength"`
MaxQueueCmd uint `json:"maxQueueCmd"`
}
// +genclient
// +genclient:noStatus
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ISGW struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec ISGWSpec `json:"spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ISGWList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []ISGW `json:"items"`
}
type ISGWConfig struct {
Server string `json:"server,omitempty"`
Clients []string `json:"clients,omitempty"`
}
// ISGWSpec represent the spec of a isgw service
type ISGWSpec struct {
// The annotations-related configuration to add/set on each Pod related object.
Annotations rookv1.Annotations `json:"annotations,omitempty"`
// The affinity to place the ISGW pods (default is to place on any available nodes in EdgeFS running namespace)
Placement rookv1.Placement `json:"placement"`
// Resources set resource requests and limits
Resources v1.ResourceRequirements `json:"resources,omitempty"`
// The number of pods in the ISGW replicaset
Instances int32 `json:"instances"`
// ISGW I/O flow direction
Direction string `json:"direction,omitempty"`
// ISGW remote URL
RemoteURL string `json:"remoteURL,omitempty"`
// ISGW ServiceType (default is ClusterIP)
ServiceType string `json:"serviceType,omitempty"`
// ISGW Relay config
Config ISGWConfig `json:"config,omitempty"`
// ISGW external port
ExternalPort uint `json:"externalPort,omitempty"`
// ISGW Replication Type
ReplicationType string `json:"replicationType,omitempty"`
// ISGW Metadata Only flag, all or versions
MetadataOnly string `json:"metadataOnly,omitempty"`
// ISGW Dynamic Fetch Addr (default is '-', means disabled)
DynamicFetchAddr string `json:"dynamicFetchAddr,omitempty"`
// ISGW Endpoint local address (default value 0.0.0.0:14000)
LocalAddr string `json:"localAddr,omitempty"`
// ISGW Encrypted Tunnel flag
UseEncryptedTunnel bool `json:"useEncryptedTunnel,omitempty"`
ResourceProfile string `json:"resourceProfile,omitempty"`
ChunkCacheSize resource.Quantity `json:"chunkCacheSize,omitempty"`
}
-60
View File
@@ -1,60 +0,0 @@
/*
Copyright 2019 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
import (
"fmt"
"strings"
)
func ByteCountBinary(b uint64) string {
const unit = 1024
if b < unit {
return fmt.Sprintf("%d B", b)
}
div, exp := uint64(unit), 0
for n := b / unit; n >= unit; n /= unit {
div *= unit
exp++
}
return fmt.Sprintf("%.1f %ciB", float64(b)/float64(div), "KMGTPE"[exp])
}
// GetModifiedRookImagePath takes current edgefs path to provide modified path to specific images
// I.e in case of original edgefs path: edgefs/edgefs:1.2.31 then edgefs ui path should be
// edgefs/edgefs-ui:1.2.25 and edgefs-restapi should be edgefs/edgefs-restapi:1.2.31
// addon param is edgefs image suffix. To get restapi image path getModifiedRookImagePath(edgefsImage, "restapi")
func GetModifiedRookImagePath(originRookImage, addon string) string {
imageParts := strings.Split(originRookImage, "/")
latestImagePartIndex := len(imageParts) - 1
modifiedImageTag := "latest"
latestImagePart := imageParts[latestImagePartIndex]
imageVersionParts := strings.Split(latestImagePart, ":")
if len(imageVersionParts) > 1 {
modifiedImageTag = imageVersionParts[1]
}
var modifiedImageName string
if len(addon) > 0 {
modifiedImageName = fmt.Sprintf("%s-%s", imageVersionParts[0], addon)
} else {
modifiedImageName = imageVersionParts[0]
}
imageParts[latestImagePartIndex] = fmt.Sprintf("%s:%s", modifiedImageName, modifiedImageTag)
return strings.Join(imageParts, "/")
}
File diff suppressed because it is too large. Load diff
@@ -23,7 +23,6 @@ import (
cassandrav1alpha1 "github.com/rook/rook/pkg/client/clientset/versioned/typed/cassandra.rook.io/v1alpha1"
cephv1 "github.com/rook/rook/pkg/client/clientset/versioned/typed/ceph.rook.io/v1"
edgefsv1 "github.com/rook/rook/pkg/client/clientset/versioned/typed/edgefs.rook.io/v1"
nfsv1alpha1 "github.com/rook/rook/pkg/client/clientset/versioned/typed/nfs.rook.io/v1alpha1"
rookv1 "github.com/rook/rook/pkg/client/clientset/versioned/typed/rook.io/v1"
rookv1alpha2 "github.com/rook/rook/pkg/client/clientset/versioned/typed/rook.io/v1alpha2"
@@ -37,7 +36,6 @@ type Interface interface {
Discovery() discovery.DiscoveryInterface
CassandraV1alpha1() cassandrav1alpha1.CassandraV1alpha1Interface
CephV1() cephv1.CephV1Interface
EdgefsV1() edgefsv1.EdgefsV1Interface
NfsV1alpha1() nfsv1alpha1.NfsV1alpha1Interface
RookV1() rookv1.RookV1Interface
RookV1alpha2() rookv1alpha2.RookV1alpha2Interface
@@ -50,7 +48,6 @@ type Clientset struct {
*discovery.DiscoveryClient
cassandraV1alpha1 *cassandrav1alpha1.CassandraV1alpha1Client
cephV1 *cephv1.CephV1Client
edgefsV1 *edgefsv1.EdgefsV1Client
nfsV1alpha1 *nfsv1alpha1.NfsV1alpha1Client
rookV1 *rookv1.RookV1Client
rookV1alpha2 *rookv1alpha2.RookV1alpha2Client
@@ -67,11 +64,6 @@ func (c *Clientset) CephV1() cephv1.CephV1Interface {
return c.cephV1
}
// EdgefsV1 retrieves the EdgefsV1Client
func (c *Clientset) EdgefsV1() edgefsv1.EdgefsV1Interface {
return c.edgefsV1
}
// NfsV1alpha1 retrieves the NfsV1alpha1Client
func (c *Clientset) NfsV1alpha1() nfsv1alpha1.NfsV1alpha1Interface {
return c.nfsV1alpha1
@@ -121,10 +113,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
if err != nil {
return nil, err
}
cs.edgefsV1, err = edgefsv1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.nfsV1alpha1, err = nfsv1alpha1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
@@ -155,7 +143,6 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
var cs Clientset
cs.cassandraV1alpha1 = cassandrav1alpha1.NewForConfigOrDie(c)
cs.cephV1 = cephv1.NewForConfigOrDie(c)
cs.edgefsV1 = edgefsv1.NewForConfigOrDie(c)
cs.nfsV1alpha1 = nfsv1alpha1.NewForConfigOrDie(c)
cs.rookV1 = rookv1.NewForConfigOrDie(c)
cs.rookV1alpha2 = rookv1alpha2.NewForConfigOrDie(c)
@@ -170,7 +157,6 @@ func New(c rest.Interface) *Clientset {
var cs Clientset
cs.cassandraV1alpha1 = cassandrav1alpha1.New(c)
cs.cephV1 = cephv1.New(c)
cs.edgefsV1 = edgefsv1.New(c)
cs.nfsV1alpha1 = nfsv1alpha1.New(c)
cs.rookV1 = rookv1.New(c)
cs.rookV1alpha2 = rookv1alpha2.New(c)
@@ -24,8 +24,6 @@ import (
fakecassandrav1alpha1 "github.com/rook/rook/pkg/client/clientset/versioned/typed/cassandra.rook.io/v1alpha1/fake"
cephv1 "github.com/rook/rook/pkg/client/clientset/versioned/typed/ceph.rook.io/v1"
fakecephv1 "github.com/rook/rook/pkg/client/clientset/versioned/typed/ceph.rook.io/v1/fake"
edgefsv1 "github.com/rook/rook/pkg/client/clientset/versioned/typed/edgefs.rook.io/v1"
fakeedgefsv1 "github.com/rook/rook/pkg/client/clientset/versioned/typed/edgefs.rook.io/v1/fake"
nfsv1alpha1 "github.com/rook/rook/pkg/client/clientset/versioned/typed/nfs.rook.io/v1alpha1"
fakenfsv1alpha1 "github.com/rook/rook/pkg/client/clientset/versioned/typed/nfs.rook.io/v1alpha1/fake"
rookv1 "github.com/rook/rook/pkg/client/clientset/versioned/typed/rook.io/v1"
@@ -98,11 +96,6 @@ func (c *Clientset) CephV1() cephv1.CephV1Interface {
return &fakecephv1.FakeCephV1{Fake: &c.Fake}
}
// EdgefsV1 retrieves the EdgefsV1Client
func (c *Clientset) EdgefsV1() edgefsv1.EdgefsV1Interface {
return &fakeedgefsv1.FakeEdgefsV1{Fake: &c.Fake}
}
// NfsV1alpha1 retrieves the NfsV1alpha1Client
func (c *Clientset) NfsV1alpha1() nfsv1alpha1.NfsV1alpha1Interface {
return &fakenfsv1alpha1.FakeNfsV1alpha1{Fake: &c.Fake}
@@ -21,7 +21,6 @@ package fake
import (
cassandrav1alpha1 "github.com/rook/rook/pkg/apis/cassandra.rook.io/v1alpha1"
cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
edgefsv1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
nfsv1alpha1 "github.com/rook/rook/pkg/apis/nfs.rook.io/v1alpha1"
rookv1 "github.com/rook/rook/pkg/apis/rook.io/v1"
rookv1alpha2 "github.com/rook/rook/pkg/apis/rook.io/v1alpha2"
@@ -39,7 +38,6 @@ var codecs = serializer.NewCodecFactory(scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
cassandrav1alpha1.AddToScheme,
cephv1.AddToScheme,
edgefsv1.AddToScheme,
nfsv1alpha1.AddToScheme,
rookv1.AddToScheme,
rookv1alpha2.AddToScheme,
@@ -21,7 +21,6 @@ package scheme
import (
cassandrav1alpha1 "github.com/rook/rook/pkg/apis/cassandra.rook.io/v1alpha1"
cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
edgefsv1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
nfsv1alpha1 "github.com/rook/rook/pkg/apis/nfs.rook.io/v1alpha1"
rookv1 "github.com/rook/rook/pkg/apis/rook.io/v1"
rookv1alpha2 "github.com/rook/rook/pkg/apis/rook.io/v1alpha2"
@@ -39,7 +38,6 @@ var ParameterCodec = runtime.NewParameterCodec(Scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
cassandrav1alpha1.AddToScheme,
cephv1.AddToScheme,
edgefsv1.AddToScheme,
nfsv1alpha1.AddToScheme,
rookv1.AddToScheme,
rookv1alpha2.AddToScheme,
@@ -1,178 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1
import (
"context"
"time"
v1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// ClustersGetter has a method to return a ClusterInterface.
// A group's client should implement this interface.
type ClustersGetter interface {
Clusters(namespace string) ClusterInterface
}
// ClusterInterface has methods to work with Cluster resources.
type ClusterInterface interface {
Create(ctx context.Context, cluster *v1.Cluster, opts metav1.CreateOptions) (*v1.Cluster, error)
Update(ctx context.Context, cluster *v1.Cluster, opts metav1.UpdateOptions) (*v1.Cluster, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Cluster, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Cluster, err error)
ClusterExpansion
}
// clusters implements ClusterInterface
type clusters struct {
client rest.Interface
ns string
}
// newClusters returns a Clusters
func newClusters(c *EdgefsV1Client, namespace string) *clusters {
return &clusters{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the cluster, and returns the corresponding cluster object, and an error if there is any.
func (c *clusters) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Cluster, err error) {
result = &v1.Cluster{}
err = c.client.Get().
Namespace(c.ns).
Resource("clusters").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Clusters that match those selectors.
func (c *clusters) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.ClusterList{}
err = c.client.Get().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested clusters.
func (c *clusters) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a cluster and creates it. Returns the server's representation of the cluster, and an error, if there is any.
func (c *clusters) Create(ctx context.Context, cluster *v1.Cluster, opts metav1.CreateOptions) (result *v1.Cluster, err error) {
result = &v1.Cluster{}
err = c.client.Post().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&opts, scheme.ParameterCodec).
Body(cluster).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a cluster and updates it. Returns the server's representation of the cluster, and an error, if there is any.
func (c *clusters) Update(ctx context.Context, cluster *v1.Cluster, opts metav1.UpdateOptions) (result *v1.Cluster, err error) {
result = &v1.Cluster{}
err = c.client.Put().
Namespace(c.ns).
Resource("clusters").
Name(cluster.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(cluster).
Do(ctx).
Into(result)
return
}
// Delete takes name of the cluster and deletes it. Returns an error if one occurs.
func (c *clusters) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("clusters").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *clusters) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched cluster.
func (c *clusters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Cluster, err error) {
result = &v1.Cluster{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("clusters").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,20 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1
@@ -1,124 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1
import (
v1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
"github.com/rook/rook/pkg/client/clientset/versioned/scheme"
rest "k8s.io/client-go/rest"
)
type EdgefsV1Interface interface {
RESTClient() rest.Interface
ClustersGetter
ISCSIsGetter
ISGWsGetter
NFSsGetter
S3sGetter
S3XsGetter
SMBsGetter
SWIFTsGetter
}
// EdgefsV1Client is used to interact with features provided by the edgefs.rook.io group.
type EdgefsV1Client struct {
restClient rest.Interface
}
func (c *EdgefsV1Client) Clusters(namespace string) ClusterInterface {
return newClusters(c, namespace)
}
func (c *EdgefsV1Client) ISCSIs(namespace string) ISCSIInterface {
return newISCSIs(c, namespace)
}
func (c *EdgefsV1Client) ISGWs(namespace string) ISGWInterface {
return newISGWs(c, namespace)
}
func (c *EdgefsV1Client) NFSs(namespace string) NFSInterface {
return newNFSs(c, namespace)
}
func (c *EdgefsV1Client) S3s(namespace string) S3Interface {
return newS3s(c, namespace)
}
func (c *EdgefsV1Client) S3Xs(namespace string) S3XInterface {
return newS3Xs(c, namespace)
}
func (c *EdgefsV1Client) SMBs(namespace string) SMBInterface {
return newSMBs(c, namespace)
}
func (c *EdgefsV1Client) SWIFTs(namespace string) SWIFTInterface {
return newSWIFTs(c, namespace)
}
// NewForConfig creates a new EdgefsV1Client for the given config.
func NewForConfig(c *rest.Config) (*EdgefsV1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &EdgefsV1Client{client}, nil
}
// NewForConfigOrDie creates a new EdgefsV1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *EdgefsV1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new EdgefsV1Client for the given RESTClient.
func New(c rest.Interface) *EdgefsV1Client {
return &EdgefsV1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *EdgefsV1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}
@@ -1,20 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// Package fake has the automatically generated clients.
package fake
@@ -1,130 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
edgefsrookiov1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeClusters implements ClusterInterface
type FakeClusters struct {
Fake *FakeEdgefsV1
ns string
}
var clustersResource = schema.GroupVersionResource{Group: "edgefs.rook.io", Version: "v1", Resource: "clusters"}
var clustersKind = schema.GroupVersionKind{Group: "edgefs.rook.io", Version: "v1", Kind: "Cluster"}
// Get takes name of the cluster, and returns the corresponding cluster object, and an error if there is any.
func (c *FakeClusters) Get(ctx context.Context, name string, options v1.GetOptions) (result *edgefsrookiov1.Cluster, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(clustersResource, c.ns, name), &edgefsrookiov1.Cluster{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.Cluster), err
}
// List takes label and field selectors, and returns the list of Clusters that match those selectors.
func (c *FakeClusters) List(ctx context.Context, opts v1.ListOptions) (result *edgefsrookiov1.ClusterList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(clustersResource, clustersKind, c.ns, opts), &edgefsrookiov1.ClusterList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &edgefsrookiov1.ClusterList{ListMeta: obj.(*edgefsrookiov1.ClusterList).ListMeta}
for _, item := range obj.(*edgefsrookiov1.ClusterList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested clusters.
func (c *FakeClusters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(clustersResource, c.ns, opts))
}
// Create takes the representation of a cluster and creates it. Returns the server's representation of the cluster, and an error, if there is any.
func (c *FakeClusters) Create(ctx context.Context, cluster *edgefsrookiov1.Cluster, opts v1.CreateOptions) (result *edgefsrookiov1.Cluster, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(clustersResource, c.ns, cluster), &edgefsrookiov1.Cluster{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.Cluster), err
}
// Update takes the representation of a cluster and updates it. Returns the server's representation of the cluster, and an error, if there is any.
func (c *FakeClusters) Update(ctx context.Context, cluster *edgefsrookiov1.Cluster, opts v1.UpdateOptions) (result *edgefsrookiov1.Cluster, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(clustersResource, c.ns, cluster), &edgefsrookiov1.Cluster{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.Cluster), err
}
// Delete takes name of the cluster and deletes it. Returns an error if one occurs.
func (c *FakeClusters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(clustersResource, c.ns, name), &edgefsrookiov1.Cluster{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeClusters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(clustersResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &edgefsrookiov1.ClusterList{})
return err
}
// Patch applies the patch and returns the patched cluster.
func (c *FakeClusters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *edgefsrookiov1.Cluster, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, pt, data, subresources...), &edgefsrookiov1.Cluster{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.Cluster), err
}
@@ -1,68 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1 "github.com/rook/rook/pkg/client/clientset/versioned/typed/edgefs.rook.io/v1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeEdgefsV1 struct {
*testing.Fake
}
func (c *FakeEdgefsV1) Clusters(namespace string) v1.ClusterInterface {
return &FakeClusters{c, namespace}
}
func (c *FakeEdgefsV1) ISCSIs(namespace string) v1.ISCSIInterface {
return &FakeISCSIs{c, namespace}
}
func (c *FakeEdgefsV1) ISGWs(namespace string) v1.ISGWInterface {
return &FakeISGWs{c, namespace}
}
func (c *FakeEdgefsV1) NFSs(namespace string) v1.NFSInterface {
return &FakeNFSs{c, namespace}
}
func (c *FakeEdgefsV1) S3s(namespace string) v1.S3Interface {
return &FakeS3s{c, namespace}
}
func (c *FakeEdgefsV1) S3Xs(namespace string) v1.S3XInterface {
return &FakeS3Xs{c, namespace}
}
func (c *FakeEdgefsV1) SMBs(namespace string) v1.SMBInterface {
return &FakeSMBs{c, namespace}
}
func (c *FakeEdgefsV1) SWIFTs(namespace string) v1.SWIFTInterface {
return &FakeSWIFTs{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeEdgefsV1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}
@@ -1,130 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
edgefsrookiov1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeISCSIs implements ISCSIInterface
type FakeISCSIs struct {
Fake *FakeEdgefsV1
ns string
}
var iscsisResource = schema.GroupVersionResource{Group: "edgefs.rook.io", Version: "v1", Resource: "iscsis"}
var iscsisKind = schema.GroupVersionKind{Group: "edgefs.rook.io", Version: "v1", Kind: "ISCSI"}
// Get takes name of the iSCSI, and returns the corresponding iSCSI object, and an error if there is any.
func (c *FakeISCSIs) Get(ctx context.Context, name string, options v1.GetOptions) (result *edgefsrookiov1.ISCSI, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(iscsisResource, c.ns, name), &edgefsrookiov1.ISCSI{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.ISCSI), err
}
// List takes label and field selectors, and returns the list of ISCSIs that match those selectors.
func (c *FakeISCSIs) List(ctx context.Context, opts v1.ListOptions) (result *edgefsrookiov1.ISCSIList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(iscsisResource, iscsisKind, c.ns, opts), &edgefsrookiov1.ISCSIList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &edgefsrookiov1.ISCSIList{ListMeta: obj.(*edgefsrookiov1.ISCSIList).ListMeta}
for _, item := range obj.(*edgefsrookiov1.ISCSIList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested iSCSIs.
func (c *FakeISCSIs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(iscsisResource, c.ns, opts))
}
// Create takes the representation of a iSCSI and creates it. Returns the server's representation of the iSCSI, and an error, if there is any.
func (c *FakeISCSIs) Create(ctx context.Context, iSCSI *edgefsrookiov1.ISCSI, opts v1.CreateOptions) (result *edgefsrookiov1.ISCSI, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(iscsisResource, c.ns, iSCSI), &edgefsrookiov1.ISCSI{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.ISCSI), err
}
// Update takes the representation of a iSCSI and updates it. Returns the server's representation of the iSCSI, and an error, if there is any.
func (c *FakeISCSIs) Update(ctx context.Context, iSCSI *edgefsrookiov1.ISCSI, opts v1.UpdateOptions) (result *edgefsrookiov1.ISCSI, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(iscsisResource, c.ns, iSCSI), &edgefsrookiov1.ISCSI{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.ISCSI), err
}
// Delete takes name of the iSCSI and deletes it. Returns an error if one occurs.
func (c *FakeISCSIs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(iscsisResource, c.ns, name), &edgefsrookiov1.ISCSI{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeISCSIs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(iscsisResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &edgefsrookiov1.ISCSIList{})
return err
}
// Patch applies the patch and returns the patched iSCSI.
func (c *FakeISCSIs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *edgefsrookiov1.ISCSI, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(iscsisResource, c.ns, name, pt, data, subresources...), &edgefsrookiov1.ISCSI{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.ISCSI), err
}
@@ -1,130 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
edgefsrookiov1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeISGWs implements ISGWInterface
type FakeISGWs struct {
Fake *FakeEdgefsV1
ns string
}
var isgwsResource = schema.GroupVersionResource{Group: "edgefs.rook.io", Version: "v1", Resource: "isgws"}
var isgwsKind = schema.GroupVersionKind{Group: "edgefs.rook.io", Version: "v1", Kind: "ISGW"}
// Get takes name of the iSGW, and returns the corresponding iSGW object, and an error if there is any.
func (c *FakeISGWs) Get(ctx context.Context, name string, options v1.GetOptions) (result *edgefsrookiov1.ISGW, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(isgwsResource, c.ns, name), &edgefsrookiov1.ISGW{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.ISGW), err
}
// List takes label and field selectors, and returns the list of ISGWs that match those selectors.
func (c *FakeISGWs) List(ctx context.Context, opts v1.ListOptions) (result *edgefsrookiov1.ISGWList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(isgwsResource, isgwsKind, c.ns, opts), &edgefsrookiov1.ISGWList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &edgefsrookiov1.ISGWList{ListMeta: obj.(*edgefsrookiov1.ISGWList).ListMeta}
for _, item := range obj.(*edgefsrookiov1.ISGWList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested iSGWs.
func (c *FakeISGWs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(isgwsResource, c.ns, opts))
}
// Create takes the representation of a iSGW and creates it. Returns the server's representation of the iSGW, and an error, if there is any.
func (c *FakeISGWs) Create(ctx context.Context, iSGW *edgefsrookiov1.ISGW, opts v1.CreateOptions) (result *edgefsrookiov1.ISGW, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(isgwsResource, c.ns, iSGW), &edgefsrookiov1.ISGW{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.ISGW), err
}
// Update takes the representation of a iSGW and updates it. Returns the server's representation of the iSGW, and an error, if there is any.
func (c *FakeISGWs) Update(ctx context.Context, iSGW *edgefsrookiov1.ISGW, opts v1.UpdateOptions) (result *edgefsrookiov1.ISGW, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(isgwsResource, c.ns, iSGW), &edgefsrookiov1.ISGW{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.ISGW), err
}
// Delete takes name of the iSGW and deletes it. Returns an error if one occurs.
func (c *FakeISGWs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(isgwsResource, c.ns, name), &edgefsrookiov1.ISGW{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeISGWs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(isgwsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &edgefsrookiov1.ISGWList{})
return err
}
// Patch applies the patch and returns the patched iSGW.
func (c *FakeISGWs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *edgefsrookiov1.ISGW, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(isgwsResource, c.ns, name, pt, data, subresources...), &edgefsrookiov1.ISGW{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.ISGW), err
}
@@ -1,130 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
edgefsrookiov1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeNFSs implements NFSInterface
type FakeNFSs struct {
Fake *FakeEdgefsV1
ns string
}
var nfssResource = schema.GroupVersionResource{Group: "edgefs.rook.io", Version: "v1", Resource: "nfss"}
var nfssKind = schema.GroupVersionKind{Group: "edgefs.rook.io", Version: "v1", Kind: "NFS"}
// Get takes name of the nFS, and returns the corresponding nFS object, and an error if there is any.
func (c *FakeNFSs) Get(ctx context.Context, name string, options v1.GetOptions) (result *edgefsrookiov1.NFS, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(nfssResource, c.ns, name), &edgefsrookiov1.NFS{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.NFS), err
}
// List takes label and field selectors, and returns the list of NFSs that match those selectors.
func (c *FakeNFSs) List(ctx context.Context, opts v1.ListOptions) (result *edgefsrookiov1.NFSList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(nfssResource, nfssKind, c.ns, opts), &edgefsrookiov1.NFSList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &edgefsrookiov1.NFSList{ListMeta: obj.(*edgefsrookiov1.NFSList).ListMeta}
for _, item := range obj.(*edgefsrookiov1.NFSList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested nFSs.
func (c *FakeNFSs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(nfssResource, c.ns, opts))
}
// Create takes the representation of a nFS and creates it. Returns the server's representation of the nFS, and an error, if there is any.
func (c *FakeNFSs) Create(ctx context.Context, nFS *edgefsrookiov1.NFS, opts v1.CreateOptions) (result *edgefsrookiov1.NFS, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(nfssResource, c.ns, nFS), &edgefsrookiov1.NFS{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.NFS), err
}
// Update takes the representation of a nFS and updates it. Returns the server's representation of the nFS, and an error, if there is any.
func (c *FakeNFSs) Update(ctx context.Context, nFS *edgefsrookiov1.NFS, opts v1.UpdateOptions) (result *edgefsrookiov1.NFS, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(nfssResource, c.ns, nFS), &edgefsrookiov1.NFS{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.NFS), err
}
// Delete takes name of the nFS and deletes it. Returns an error if one occurs.
func (c *FakeNFSs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(nfssResource, c.ns, name), &edgefsrookiov1.NFS{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeNFSs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(nfssResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &edgefsrookiov1.NFSList{})
return err
}
// Patch applies the patch and returns the patched nFS.
func (c *FakeNFSs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *edgefsrookiov1.NFS, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(nfssResource, c.ns, name, pt, data, subresources...), &edgefsrookiov1.NFS{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.NFS), err
}
@@ -1,130 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
edgefsrookiov1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeS3s implements S3Interface
type FakeS3s struct {
Fake *FakeEdgefsV1
ns string
}
var s3sResource = schema.GroupVersionResource{Group: "edgefs.rook.io", Version: "v1", Resource: "s3s"}
var s3sKind = schema.GroupVersionKind{Group: "edgefs.rook.io", Version: "v1", Kind: "S3"}
// Get takes name of the s3, and returns the corresponding s3 object, and an error if there is any.
func (c *FakeS3s) Get(ctx context.Context, name string, options v1.GetOptions) (result *edgefsrookiov1.S3, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(s3sResource, c.ns, name), &edgefsrookiov1.S3{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.S3), err
}
// List takes label and field selectors, and returns the list of S3s that match those selectors.
func (c *FakeS3s) List(ctx context.Context, opts v1.ListOptions) (result *edgefsrookiov1.S3List, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(s3sResource, s3sKind, c.ns, opts), &edgefsrookiov1.S3List{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &edgefsrookiov1.S3List{ListMeta: obj.(*edgefsrookiov1.S3List).ListMeta}
for _, item := range obj.(*edgefsrookiov1.S3List).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested s3s.
func (c *FakeS3s) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(s3sResource, c.ns, opts))
}
// Create takes the representation of a s3 and creates it. Returns the server's representation of the s3, and an error, if there is any.
func (c *FakeS3s) Create(ctx context.Context, s3 *edgefsrookiov1.S3, opts v1.CreateOptions) (result *edgefsrookiov1.S3, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(s3sResource, c.ns, s3), &edgefsrookiov1.S3{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.S3), err
}
// Update takes the representation of a s3 and updates it. Returns the server's representation of the s3, and an error, if there is any.
func (c *FakeS3s) Update(ctx context.Context, s3 *edgefsrookiov1.S3, opts v1.UpdateOptions) (result *edgefsrookiov1.S3, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(s3sResource, c.ns, s3), &edgefsrookiov1.S3{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.S3), err
}
// Delete takes name of the s3 and deletes it. Returns an error if one occurs.
func (c *FakeS3s) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(s3sResource, c.ns, name), &edgefsrookiov1.S3{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeS3s) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(s3sResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &edgefsrookiov1.S3List{})
return err
}
// Patch applies the patch and returns the patched s3.
func (c *FakeS3s) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *edgefsrookiov1.S3, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(s3sResource, c.ns, name, pt, data, subresources...), &edgefsrookiov1.S3{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.S3), err
}
@@ -1,130 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
edgefsrookiov1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeS3Xs implements S3XInterface
type FakeS3Xs struct {
Fake *FakeEdgefsV1
ns string
}
var s3xsResource = schema.GroupVersionResource{Group: "edgefs.rook.io", Version: "v1", Resource: "s3xs"}
var s3xsKind = schema.GroupVersionKind{Group: "edgefs.rook.io", Version: "v1", Kind: "S3X"}
// Get takes name of the s3X, and returns the corresponding s3X object, and an error if there is any.
func (c *FakeS3Xs) Get(ctx context.Context, name string, options v1.GetOptions) (result *edgefsrookiov1.S3X, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(s3xsResource, c.ns, name), &edgefsrookiov1.S3X{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.S3X), err
}
// List takes label and field selectors, and returns the list of S3Xs that match those selectors.
func (c *FakeS3Xs) List(ctx context.Context, opts v1.ListOptions) (result *edgefsrookiov1.S3XList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(s3xsResource, s3xsKind, c.ns, opts), &edgefsrookiov1.S3XList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &edgefsrookiov1.S3XList{ListMeta: obj.(*edgefsrookiov1.S3XList).ListMeta}
for _, item := range obj.(*edgefsrookiov1.S3XList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested s3Xs.
func (c *FakeS3Xs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(s3xsResource, c.ns, opts))
}
// Create takes the representation of a s3X and creates it. Returns the server's representation of the s3X, and an error, if there is any.
func (c *FakeS3Xs) Create(ctx context.Context, s3X *edgefsrookiov1.S3X, opts v1.CreateOptions) (result *edgefsrookiov1.S3X, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(s3xsResource, c.ns, s3X), &edgefsrookiov1.S3X{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.S3X), err
}
// Update takes the representation of a s3X and updates it. Returns the server's representation of the s3X, and an error, if there is any.
func (c *FakeS3Xs) Update(ctx context.Context, s3X *edgefsrookiov1.S3X, opts v1.UpdateOptions) (result *edgefsrookiov1.S3X, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(s3xsResource, c.ns, s3X), &edgefsrookiov1.S3X{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.S3X), err
}
// Delete takes name of the s3X and deletes it. Returns an error if one occurs.
func (c *FakeS3Xs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(s3xsResource, c.ns, name), &edgefsrookiov1.S3X{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeS3Xs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(s3xsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &edgefsrookiov1.S3XList{})
return err
}
// Patch applies the patch and returns the patched s3X.
func (c *FakeS3Xs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *edgefsrookiov1.S3X, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(s3xsResource, c.ns, name, pt, data, subresources...), &edgefsrookiov1.S3X{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.S3X), err
}
@@ -1,130 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
edgefsrookiov1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeSMBs implements SMBInterface
type FakeSMBs struct {
Fake *FakeEdgefsV1
ns string
}
var smbsResource = schema.GroupVersionResource{Group: "edgefs.rook.io", Version: "v1", Resource: "smbs"}
var smbsKind = schema.GroupVersionKind{Group: "edgefs.rook.io", Version: "v1", Kind: "SMB"}
// Get takes name of the sMB, and returns the corresponding sMB object, and an error if there is any.
func (c *FakeSMBs) Get(ctx context.Context, name string, options v1.GetOptions) (result *edgefsrookiov1.SMB, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(smbsResource, c.ns, name), &edgefsrookiov1.SMB{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.SMB), err
}
// List takes label and field selectors, and returns the list of SMBs that match those selectors.
func (c *FakeSMBs) List(ctx context.Context, opts v1.ListOptions) (result *edgefsrookiov1.SMBList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(smbsResource, smbsKind, c.ns, opts), &edgefsrookiov1.SMBList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &edgefsrookiov1.SMBList{ListMeta: obj.(*edgefsrookiov1.SMBList).ListMeta}
for _, item := range obj.(*edgefsrookiov1.SMBList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested sMBs.
func (c *FakeSMBs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(smbsResource, c.ns, opts))
}
// Create takes the representation of a sMB and creates it. Returns the server's representation of the sMB, and an error, if there is any.
func (c *FakeSMBs) Create(ctx context.Context, sMB *edgefsrookiov1.SMB, opts v1.CreateOptions) (result *edgefsrookiov1.SMB, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(smbsResource, c.ns, sMB), &edgefsrookiov1.SMB{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.SMB), err
}
// Update takes the representation of a sMB and updates it. Returns the server's representation of the sMB, and an error, if there is any.
func (c *FakeSMBs) Update(ctx context.Context, sMB *edgefsrookiov1.SMB, opts v1.UpdateOptions) (result *edgefsrookiov1.SMB, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(smbsResource, c.ns, sMB), &edgefsrookiov1.SMB{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.SMB), err
}
// Delete takes name of the sMB and deletes it. Returns an error if one occurs.
func (c *FakeSMBs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(smbsResource, c.ns, name), &edgefsrookiov1.SMB{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeSMBs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(smbsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &edgefsrookiov1.SMBList{})
return err
}
// Patch applies the patch and returns the patched sMB.
func (c *FakeSMBs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *edgefsrookiov1.SMB, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(smbsResource, c.ns, name, pt, data, subresources...), &edgefsrookiov1.SMB{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.SMB), err
}
@@ -1,130 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
edgefsrookiov1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeSWIFTs implements SWIFTInterface
type FakeSWIFTs struct {
Fake *FakeEdgefsV1
ns string
}
var swiftsResource = schema.GroupVersionResource{Group: "edgefs.rook.io", Version: "v1", Resource: "swifts"}
var swiftsKind = schema.GroupVersionKind{Group: "edgefs.rook.io", Version: "v1", Kind: "SWIFT"}
// Get takes name of the sWIFT, and returns the corresponding sWIFT object, and an error if there is any.
func (c *FakeSWIFTs) Get(ctx context.Context, name string, options v1.GetOptions) (result *edgefsrookiov1.SWIFT, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(swiftsResource, c.ns, name), &edgefsrookiov1.SWIFT{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.SWIFT), err
}
// List takes label and field selectors, and returns the list of SWIFTs that match those selectors.
func (c *FakeSWIFTs) List(ctx context.Context, opts v1.ListOptions) (result *edgefsrookiov1.SWIFTList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(swiftsResource, swiftsKind, c.ns, opts), &edgefsrookiov1.SWIFTList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &edgefsrookiov1.SWIFTList{ListMeta: obj.(*edgefsrookiov1.SWIFTList).ListMeta}
for _, item := range obj.(*edgefsrookiov1.SWIFTList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested sWIFTs.
func (c *FakeSWIFTs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(swiftsResource, c.ns, opts))
}
// Create takes the representation of a sWIFT and creates it. Returns the server's representation of the sWIFT, and an error, if there is any.
func (c *FakeSWIFTs) Create(ctx context.Context, sWIFT *edgefsrookiov1.SWIFT, opts v1.CreateOptions) (result *edgefsrookiov1.SWIFT, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(swiftsResource, c.ns, sWIFT), &edgefsrookiov1.SWIFT{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.SWIFT), err
}
// Update takes the representation of a sWIFT and updates it. Returns the server's representation of the sWIFT, and an error, if there is any.
func (c *FakeSWIFTs) Update(ctx context.Context, sWIFT *edgefsrookiov1.SWIFT, opts v1.UpdateOptions) (result *edgefsrookiov1.SWIFT, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(swiftsResource, c.ns, sWIFT), &edgefsrookiov1.SWIFT{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.SWIFT), err
}
// Delete takes name of the sWIFT and deletes it. Returns an error if one occurs.
func (c *FakeSWIFTs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(swiftsResource, c.ns, name), &edgefsrookiov1.SWIFT{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeSWIFTs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(swiftsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &edgefsrookiov1.SWIFTList{})
return err
}
// Patch applies the patch and returns the patched sWIFT.
func (c *FakeSWIFTs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *edgefsrookiov1.SWIFT, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(swiftsResource, c.ns, name, pt, data, subresources...), &edgefsrookiov1.SWIFT{})
if obj == nil {
return nil, err
}
return obj.(*edgefsrookiov1.SWIFT), err
}
@@ -1,35 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1
type ClusterExpansion interface{}
type ISCSIExpansion interface{}
type ISGWExpansion interface{}
type NFSExpansion interface{}
type S3Expansion interface{}
type S3XExpansion interface{}
type SMBExpansion interface{}
type SWIFTExpansion interface{}
@@ -1,178 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1
import (
"context"
"time"
v1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// ISCSIsGetter has a method to return a ISCSIInterface.
// A group's client should implement this interface.
type ISCSIsGetter interface {
ISCSIs(namespace string) ISCSIInterface
}
// ISCSIInterface has methods to work with ISCSI resources.
type ISCSIInterface interface {
Create(ctx context.Context, iSCSI *v1.ISCSI, opts metav1.CreateOptions) (*v1.ISCSI, error)
Update(ctx context.Context, iSCSI *v1.ISCSI, opts metav1.UpdateOptions) (*v1.ISCSI, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ISCSI, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.ISCSIList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ISCSI, err error)
ISCSIExpansion
}
// iSCSIs implements ISCSIInterface
type iSCSIs struct {
client rest.Interface
ns string
}
// newISCSIs returns a ISCSIs
func newISCSIs(c *EdgefsV1Client, namespace string) *iSCSIs {
return &iSCSIs{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the iSCSI, and returns the corresponding iSCSI object, and an error if there is any.
func (c *iSCSIs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ISCSI, err error) {
result = &v1.ISCSI{}
err = c.client.Get().
Namespace(c.ns).
Resource("iscsis").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ISCSIs that match those selectors.
func (c *iSCSIs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ISCSIList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.ISCSIList{}
err = c.client.Get().
Namespace(c.ns).
Resource("iscsis").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested iSCSIs.
func (c *iSCSIs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("iscsis").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a iSCSI and creates it. Returns the server's representation of the iSCSI, and an error, if there is any.
func (c *iSCSIs) Create(ctx context.Context, iSCSI *v1.ISCSI, opts metav1.CreateOptions) (result *v1.ISCSI, err error) {
result = &v1.ISCSI{}
err = c.client.Post().
Namespace(c.ns).
Resource("iscsis").
VersionedParams(&opts, scheme.ParameterCodec).
Body(iSCSI).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a iSCSI and updates it. Returns the server's representation of the iSCSI, and an error, if there is any.
func (c *iSCSIs) Update(ctx context.Context, iSCSI *v1.ISCSI, opts metav1.UpdateOptions) (result *v1.ISCSI, err error) {
result = &v1.ISCSI{}
err = c.client.Put().
Namespace(c.ns).
Resource("iscsis").
Name(iSCSI.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(iSCSI).
Do(ctx).
Into(result)
return
}
// Delete takes name of the iSCSI and deletes it. Returns an error if one occurs.
func (c *iSCSIs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("iscsis").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *iSCSIs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("iscsis").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched iSCSI.
func (c *iSCSIs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ISCSI, err error) {
result = &v1.ISCSI{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("iscsis").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,178 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1
import (
"context"
"time"
v1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// ISGWsGetter has a method to return a ISGWInterface.
// A group's client should implement this interface.
type ISGWsGetter interface {
ISGWs(namespace string) ISGWInterface
}
// ISGWInterface has methods to work with ISGW resources.
type ISGWInterface interface {
Create(ctx context.Context, iSGW *v1.ISGW, opts metav1.CreateOptions) (*v1.ISGW, error)
Update(ctx context.Context, iSGW *v1.ISGW, opts metav1.UpdateOptions) (*v1.ISGW, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ISGW, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.ISGWList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ISGW, err error)
ISGWExpansion
}
// iSGWs implements ISGWInterface
type iSGWs struct {
client rest.Interface
ns string
}
// newISGWs returns a ISGWs
func newISGWs(c *EdgefsV1Client, namespace string) *iSGWs {
return &iSGWs{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the iSGW, and returns the corresponding iSGW object, and an error if there is any.
func (c *iSGWs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ISGW, err error) {
result = &v1.ISGW{}
err = c.client.Get().
Namespace(c.ns).
Resource("isgws").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ISGWs that match those selectors.
func (c *iSGWs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ISGWList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.ISGWList{}
err = c.client.Get().
Namespace(c.ns).
Resource("isgws").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested iSGWs.
func (c *iSGWs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("isgws").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a iSGW and creates it. Returns the server's representation of the iSGW, and an error, if there is any.
func (c *iSGWs) Create(ctx context.Context, iSGW *v1.ISGW, opts metav1.CreateOptions) (result *v1.ISGW, err error) {
result = &v1.ISGW{}
err = c.client.Post().
Namespace(c.ns).
Resource("isgws").
VersionedParams(&opts, scheme.ParameterCodec).
Body(iSGW).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a iSGW and updates it. Returns the server's representation of the iSGW, and an error, if there is any.
func (c *iSGWs) Update(ctx context.Context, iSGW *v1.ISGW, opts metav1.UpdateOptions) (result *v1.ISGW, err error) {
result = &v1.ISGW{}
err = c.client.Put().
Namespace(c.ns).
Resource("isgws").
Name(iSGW.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(iSGW).
Do(ctx).
Into(result)
return
}
// Delete takes name of the iSGW and deletes it. Returns an error if one occurs.
func (c *iSGWs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("isgws").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *iSGWs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("isgws").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched iSGW.
func (c *iSGWs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ISGW, err error) {
result = &v1.ISGW{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("isgws").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,178 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1
import (
"context"
"time"
v1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// NFSsGetter has a method to return a NFSInterface.
// A group's client should implement this interface.
type NFSsGetter interface {
NFSs(namespace string) NFSInterface
}
// NFSInterface has methods to work with NFS resources.
type NFSInterface interface {
Create(ctx context.Context, nFS *v1.NFS, opts metav1.CreateOptions) (*v1.NFS, error)
Update(ctx context.Context, nFS *v1.NFS, opts metav1.UpdateOptions) (*v1.NFS, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.NFS, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.NFSList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NFS, err error)
NFSExpansion
}
// nFSs implements NFSInterface
type nFSs struct {
client rest.Interface
ns string
}
// newNFSs returns a NFSs
func newNFSs(c *EdgefsV1Client, namespace string) *nFSs {
return &nFSs{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the nFS, and returns the corresponding nFS object, and an error if there is any.
func (c *nFSs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.NFS, err error) {
result = &v1.NFS{}
err = c.client.Get().
Namespace(c.ns).
Resource("nfss").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of NFSs that match those selectors.
func (c *nFSs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NFSList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.NFSList{}
err = c.client.Get().
Namespace(c.ns).
Resource("nfss").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested nFSs.
func (c *nFSs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("nfss").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a nFS and creates it. Returns the server's representation of the nFS, and an error, if there is any.
func (c *nFSs) Create(ctx context.Context, nFS *v1.NFS, opts metav1.CreateOptions) (result *v1.NFS, err error) {
result = &v1.NFS{}
err = c.client.Post().
Namespace(c.ns).
Resource("nfss").
VersionedParams(&opts, scheme.ParameterCodec).
Body(nFS).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a nFS and updates it. Returns the server's representation of the nFS, and an error, if there is any.
func (c *nFSs) Update(ctx context.Context, nFS *v1.NFS, opts metav1.UpdateOptions) (result *v1.NFS, err error) {
result = &v1.NFS{}
err = c.client.Put().
Namespace(c.ns).
Resource("nfss").
Name(nFS.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(nFS).
Do(ctx).
Into(result)
return
}
// Delete takes name of the nFS and deletes it. Returns an error if one occurs.
func (c *nFSs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("nfss").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *nFSs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("nfss").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched nFS.
func (c *nFSs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NFS, err error) {
result = &v1.NFS{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("nfss").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,178 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1
import (
"context"
"time"
v1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// S3sGetter has a method to return a S3Interface.
// A group's client should implement this interface.
type S3sGetter interface {
S3s(namespace string) S3Interface
}
// S3Interface has methods to work with S3 resources.
type S3Interface interface {
Create(ctx context.Context, s3 *v1.S3, opts metav1.CreateOptions) (*v1.S3, error)
Update(ctx context.Context, s3 *v1.S3, opts metav1.UpdateOptions) (*v1.S3, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.S3, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.S3List, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.S3, err error)
S3Expansion
}
// s3s implements S3Interface
type s3s struct {
client rest.Interface
ns string
}
// newS3s returns a S3s
func newS3s(c *EdgefsV1Client, namespace string) *s3s {
return &s3s{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the s3, and returns the corresponding s3 object, and an error if there is any.
func (c *s3s) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.S3, err error) {
result = &v1.S3{}
err = c.client.Get().
Namespace(c.ns).
Resource("s3s").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of S3s that match those selectors.
func (c *s3s) List(ctx context.Context, opts metav1.ListOptions) (result *v1.S3List, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.S3List{}
err = c.client.Get().
Namespace(c.ns).
Resource("s3s").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested s3s.
func (c *s3s) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("s3s").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a s3 and creates it. Returns the server's representation of the s3, and an error, if there is any.
func (c *s3s) Create(ctx context.Context, s3 *v1.S3, opts metav1.CreateOptions) (result *v1.S3, err error) {
result = &v1.S3{}
err = c.client.Post().
Namespace(c.ns).
Resource("s3s").
VersionedParams(&opts, scheme.ParameterCodec).
Body(s3).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a s3 and updates it. Returns the server's representation of the s3, and an error, if there is any.
func (c *s3s) Update(ctx context.Context, s3 *v1.S3, opts metav1.UpdateOptions) (result *v1.S3, err error) {
result = &v1.S3{}
err = c.client.Put().
Namespace(c.ns).
Resource("s3s").
Name(s3.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(s3).
Do(ctx).
Into(result)
return
}
// Delete takes name of the s3 and deletes it. Returns an error if one occurs.
func (c *s3s) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("s3s").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *s3s) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("s3s").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched s3.
func (c *s3s) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.S3, err error) {
result = &v1.S3{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("s3s").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,178 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1
import (
"context"
"time"
v1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// S3XsGetter has a method to return a S3XInterface.
// A group's client should implement this interface.
type S3XsGetter interface {
S3Xs(namespace string) S3XInterface
}
// S3XInterface has methods to work with S3X resources.
type S3XInterface interface {
Create(ctx context.Context, s3X *v1.S3X, opts metav1.CreateOptions) (*v1.S3X, error)
Update(ctx context.Context, s3X *v1.S3X, opts metav1.UpdateOptions) (*v1.S3X, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.S3X, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.S3XList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.S3X, err error)
S3XExpansion
}
// s3Xs implements S3XInterface
type s3Xs struct {
client rest.Interface
ns string
}
// newS3Xs returns a S3Xs
func newS3Xs(c *EdgefsV1Client, namespace string) *s3Xs {
return &s3Xs{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the s3X, and returns the corresponding s3X object, and an error if there is any.
func (c *s3Xs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.S3X, err error) {
result = &v1.S3X{}
err = c.client.Get().
Namespace(c.ns).
Resource("s3xs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of S3Xs that match those selectors.
func (c *s3Xs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.S3XList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.S3XList{}
err = c.client.Get().
Namespace(c.ns).
Resource("s3xs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested s3Xs.
func (c *s3Xs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("s3xs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a s3X and creates it. Returns the server's representation of the s3X, and an error, if there is any.
func (c *s3Xs) Create(ctx context.Context, s3X *v1.S3X, opts metav1.CreateOptions) (result *v1.S3X, err error) {
result = &v1.S3X{}
err = c.client.Post().
Namespace(c.ns).
Resource("s3xs").
VersionedParams(&opts, scheme.ParameterCodec).
Body(s3X).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a s3X and updates it. Returns the server's representation of the s3X, and an error, if there is any.
func (c *s3Xs) Update(ctx context.Context, s3X *v1.S3X, opts metav1.UpdateOptions) (result *v1.S3X, err error) {
result = &v1.S3X{}
err = c.client.Put().
Namespace(c.ns).
Resource("s3xs").
Name(s3X.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(s3X).
Do(ctx).
Into(result)
return
}
// Delete takes name of the s3X and deletes it. Returns an error if one occurs.
func (c *s3Xs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("s3xs").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *s3Xs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("s3xs").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched s3X.
func (c *s3Xs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.S3X, err error) {
result = &v1.S3X{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("s3xs").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,178 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1
import (
"context"
"time"
v1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// SMBsGetter has a method to return a SMBInterface.
// A group's client should implement this interface.
type SMBsGetter interface {
SMBs(namespace string) SMBInterface
}
// SMBInterface has methods to work with SMB resources.
type SMBInterface interface {
Create(ctx context.Context, sMB *v1.SMB, opts metav1.CreateOptions) (*v1.SMB, error)
Update(ctx context.Context, sMB *v1.SMB, opts metav1.UpdateOptions) (*v1.SMB, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.SMB, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.SMBList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SMB, err error)
SMBExpansion
}
// sMBs implements SMBInterface
type sMBs struct {
client rest.Interface
ns string
}
// newSMBs returns a SMBs
func newSMBs(c *EdgefsV1Client, namespace string) *sMBs {
return &sMBs{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the sMB, and returns the corresponding sMB object, and an error if there is any.
func (c *sMBs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.SMB, err error) {
result = &v1.SMB{}
err = c.client.Get().
Namespace(c.ns).
Resource("smbs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of SMBs that match those selectors.
func (c *sMBs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SMBList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.SMBList{}
err = c.client.Get().
Namespace(c.ns).
Resource("smbs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested sMBs.
func (c *sMBs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("smbs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a sMB and creates it. Returns the server's representation of the sMB, and an error, if there is any.
func (c *sMBs) Create(ctx context.Context, sMB *v1.SMB, opts metav1.CreateOptions) (result *v1.SMB, err error) {
result = &v1.SMB{}
err = c.client.Post().
Namespace(c.ns).
Resource("smbs").
VersionedParams(&opts, scheme.ParameterCodec).
Body(sMB).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a sMB and updates it. Returns the server's representation of the sMB, and an error, if there is any.
func (c *sMBs) Update(ctx context.Context, sMB *v1.SMB, opts metav1.UpdateOptions) (result *v1.SMB, err error) {
result = &v1.SMB{}
err = c.client.Put().
Namespace(c.ns).
Resource("smbs").
Name(sMB.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(sMB).
Do(ctx).
Into(result)
return
}
// Delete takes name of the sMB and deletes it. Returns an error if one occurs.
func (c *sMBs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("smbs").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *sMBs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("smbs").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched sMB.
func (c *sMBs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SMB, err error) {
result = &v1.SMB{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("smbs").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,178 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1
import (
"context"
"time"
v1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1"
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// SWIFTsGetter has a method to return a SWIFTInterface.
// A group's client should implement this interface.
type SWIFTsGetter interface {
SWIFTs(namespace string) SWIFTInterface
}
// SWIFTInterface has methods to work with SWIFT resources.
type SWIFTInterface interface {
Create(ctx context.Context, sWIFT *v1.SWIFT, opts metav1.CreateOptions) (*v1.SWIFT, error)
Update(ctx context.Context, sWIFT *v1.SWIFT, opts metav1.UpdateOptions) (*v1.SWIFT, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.SWIFT, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.SWIFTList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SWIFT, err error)
SWIFTExpansion
}
// sWIFTs implements SWIFTInterface
type sWIFTs struct {
client rest.Interface
ns string
}
// newSWIFTs returns a SWIFTs
func newSWIFTs(c *EdgefsV1Client, namespace string) *sWIFTs {
return &sWIFTs{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the sWIFT, and returns the corresponding sWIFT object, and an error if there is any.
func (c *sWIFTs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.SWIFT, err error) {
result = &v1.SWIFT{}
err = c.client.Get().
Namespace(c.ns).
Resource("swifts").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of SWIFTs that match those selectors.
func (c *sWIFTs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SWIFTList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.SWIFTList{}
err = c.client.Get().
Namespace(c.ns).
Resource("swifts").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested sWIFTs.
func (c *sWIFTs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("swifts").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a sWIFT and creates it. Returns the server's representation of the sWIFT, and an error, if there is any.
func (c *sWIFTs) Create(ctx context.Context, sWIFT *v1.SWIFT, opts metav1.CreateOptions) (result *v1.SWIFT, err error) {
result = &v1.SWIFT{}
err = c.client.Post().
Namespace(c.ns).
Resource("swifts").
VersionedParams(&opts, scheme.ParameterCodec).
Body(sWIFT).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a sWIFT and updates it. Returns the server's representation of the sWIFT, and an error, if there is any.
func (c *sWIFTs) Update(ctx context.Context, sWIFT *v1.SWIFT, opts metav1.UpdateOptions) (result *v1.SWIFT, err error) {
result = &v1.SWIFT{}
err = c.client.Put().
Namespace(c.ns).
Resource("swifts").
Name(sWIFT.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(sWIFT).
Do(ctx).
Into(result)
return
}
// Delete takes name of the sWIFT and deletes it. Returns an error if one occurs.
func (c *sWIFTs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("swifts").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *sWIFTs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("swifts").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched sWIFT.
func (c *sWIFTs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SWIFT, err error) {
result = &v1.SWIFT{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("swifts").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,46 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package edgefs
import (
v1 "github.com/rook/rook/pkg/client/informers/externalversions/edgefs.rook.io/v1"
internalinterfaces "github.com/rook/rook/pkg/client/informers/externalversions/internalinterfaces"
)
// Interface provides access to each of this group's versions.
type Interface interface {
// V1 provides access to shared informers for resources in V1.
V1() v1.Interface
}
type group struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// V1 returns a new v1.Interface.
func (g *group) V1() v1.Interface {
return v1.New(g.factory, g.namespace, g.tweakListOptions)
}
Loaded 100 of 156 files, more files were not shown because too many files have changed in this diff. Show more