Skip to content

Commit

Permalink
chore(doc):fix typos across various files (#368)
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Elling <[email protected]>
  • Loading branch information
richardelling authored and kmova committed Feb 11, 2020
1 parent 2ec90e8 commit 5b18203
Show file tree
Hide file tree
Showing 36 changed files with 51 additions and 51 deletions.
4 changes: 2 additions & 2 deletions cmd/ndm_daemonset/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const (
KubernetesHostNameLabel = kubernetesLabelPrefix + HostNameKey
// NDMVersion is the CR version.
NDMVersion = openEBSLabelPrefix + "v1alpha1"
// reconcileKey is the key used for enable/disable of reconcilation
// reconcileKey is the key used for enable/disable of reconciliation
reconcileKey = "reconcile"
// OpenEBSReconcile is used in annotation to check whether CR is to be reconciled or not
OpenEBSReconcile = openEBSLabelPrefix + reconcileKey
Expand All @@ -69,7 +69,7 @@ const (
NDMActive = "Active"
// NDMInactive is constant for inactive resource status.
NDMInactive = "Inactive"
// NDMUnknown is constant for resource unknown satus.
// NDMUnknown is constant for resource unknown status.
NDMUnknown = "Unknown"
// NDMDiskTypeKey specifies the type of disk.
NDMDiskTypeKey = "ndm.io/disk-type"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ndm_daemonset/controller/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (di *DiskInfo) ToDisk() apis.Disk {
}

// ToPartition convert the PartitionData struct inside DiskInfo to apis.Partition
// which will be used to include the parition information in the Disk CR
// which will be used to include the partition information in the Disk CR
func (di *DiskInfo) ToPartition() []apis.Partition {
partition := make([]apis.Partition, 0)
for _, partitionData := range di.PartitionData {
Expand Down
2 changes: 1 addition & 1 deletion cmd/ndm_daemonset/controller/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type FilterInterface interface {
// does not match with exclude value then it returns false
type Filters interface {
Include(*DiskInfo) bool // Include returns True if passing DiskInfo matches with include value
Exclude(*DiskInfo) bool // exclude returns True if passing DiskInfo does not matche with exclude value
Exclude(*DiskInfo) bool // exclude returns True if passing DiskInfo does not match with exclude value
}

// AddNewFilter adds new filter to controller object
Expand Down
2 changes: 1 addition & 1 deletion cmd/ndm_daemonset/controller/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func TestListFilter(t *testing.T) {
}
}

func TestSrartFilter(t *testing.T) {
func TestStartFilter(t *testing.T) {
var msg1 string
filter := &fakeFilter{}
filter1 := &Filter{
Expand Down
2 changes: 1 addition & 1 deletion cmd/ndm_daemonset/controller/ndmconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
// ConfigFilePath contains configmap file path
var ConfigFilePath = "/host/node-disk-manager.config"

// NodeDiskManagerConfig contains congigs of probes and filters
// NodeDiskManagerConfig contains configs of probes and filters
type NodeDiskManagerConfig struct {
ProbeConfigs []ProbeConfig `json:"probeconfigs"` // ProbeConfigs contains configs of Probes
FilterConfigs []FilterConfig `json:"filterconfigs"` // FilterConfigs contains configs of Filters
Expand Down
2 changes: 1 addition & 1 deletion cmd/ndm_daemonset/controller/probe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func TestFillDetails(t *testing.T) {
actualDisk *DiskInfo
expectedDisk *DiskInfo
}{
"push resouce with 'fake-disk-uid' uuid for create resource": {actualDisk: actualDr, expectedDisk: expectedDr},
"push resource with 'fake-disk-uid' uuid for create resource": {actualDisk: actualDr, expectedDisk: expectedDr},
}
for name, test := range tests {
t.Run(name, func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/ndm_daemonset/filter/osdiskexcludefilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,6 @@ func (odf *oSDiskExcludeFilter) Exclude(d *controller.DiskInfo) bool {
partitionRegex = "[0-9]*$"
}
regex := "^" + odf.excludeDevPath + partitionRegex
klog.Infof("applying os-fiter regex %s on %s", regex, d.Path)
klog.Infof("applying os-filter regex %s on %s", regex, d.Path)
return !util.IsMatchRegex(regex, d.Path)
}
2 changes: 1 addition & 1 deletion cmd/ndm_daemonset/filter/pathfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (pf *pathFilter) Include(d *controller.DiskInfo) bool {
return util.MatchIgnoredCase(pf.includePaths, d.Path)
}

// Exclude returns true if the disk path does not matche any given
// Exclude returns true if the disk path does not match any given
// keywords
func (pf *pathFilter) Exclude(d *controller.DiskInfo) bool {
if len(pf.excludePaths) == 0 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/ndm_daemonset/filter/vendorfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (vf *vendorFilter) Include(d *controller.DiskInfo) bool {
return util.ContainsIgnoredCase(vf.includeVendors, d.Vendor)
}

// Exclude returns true if vendor of the disk does not matche with given
// Exclude returns true if vendor of the disk does not match with given
// list or the list of the length is 0
func (vf *vendorFilter) Exclude(d *controller.DiskInfo) bool {
if len(vf.excludeVendors) == 0 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/ndm_daemonset/probe/eventhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (pe *ProbeEvent) addDiskEvent(msg controller.EventMessage) {
}
klog.Info("Processed details for ", diskDetails.ProbeIdentifiers.Uuid)
oldDr := pe.Controller.GetExistingDiskResource(diskList, diskDetails.ProbeIdentifiers.Uuid)
// if old DiskCR doesn't exist and parition is found, it is ignored since we don't need info
// if old DiskCR doesn't exist and partition is found, it is ignored since we don't need info
// of partition if disk as a whole is ignored
if oldDr == nil && len(diskDetails.PartitionData) != 0 {
klog.Info("Skipping partition of already excluded disk ", diskDetails.ProbeIdentifiers.Uuid)
Expand Down
2 changes: 1 addition & 1 deletion cmd/ndm_daemonset/probe/udevprobe.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (up *udevProbe) scan() error {
return nil
}

// fillDiskDetails filles details in diskInfo struct using probe information
// fillDiskDetails fills details in diskInfo struct using probe information
func (up *udevProbe) FillDiskDetails(d *controller.DiskInfo) {
udevDevice, err := newUdevProbeForFillDiskDetails(d.ProbeIdentifiers.UdevIdentifier)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion deploy/node-disk-manager-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
namespace: default
data:
# udev-probe is default or primary probe it should be enabled to run ndm
# filterconfigs contails configs of filters. To provide a group of include
# filterconfigs contains configs of filters. To provide a group of include
# and exclude values add it as , separated string
node-disk-manager.config: |
probeconfigs:
Expand Down
2 changes: 1 addition & 1 deletion docs/design.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Introduction

This document presents use-cases, high level design and workflow changes required for using disks attached to the Kubernetes Nodes by Container Attached Storages(CAS) like OpenEBS, Longhorn, etc. This design includes introducing new add-on component called - **_node-disk-manager(ndm)_**, as well as extending some existing components where applicable like *node-problem-detector*, *node-feature-discovery*, etc.
This document presents use-cases, high level design and workflow changes required for using disks attached to the Kubernetes Nodes by Container Attached Storage(CAS) like OpenEBS, Longhorn, etc. This design includes introducing new add-on component called - **_node-disk-manager(ndm)_**, as well as extending some existing components where applicable like *node-problem-detector*, *node-feature-discovery*, etc.

## Prerequisites

Expand Down
2 changes: 1 addition & 1 deletion integration_tests/k8s/k8sapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
// The wait time for all k8s API related operations
const k8sWaitTime = 40 * time.Second

// The wait time for reconcilation loop to run
// The wait time for reconciliation loop to run
const k8sReconcileTime = 10 * time.Second

// ListPodStatus returns the list of all pods in the given Namespace along
Expand Down
4 changes: 2 additions & 2 deletions integration_tests/k8s/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ func WaitForStateChange() {
time.Sleep(k8sWaitTime)
}

// WaitForReconcilation sleeps the process for a fixed duration so
// WaitForReconciliation sleeps the process for a fixed duration so
// that the reconcile loop can run and fetch the required changes
func WaitForReconcilation() {
func WaitForReconciliation() {
time.Sleep(k8sReconcileTime)
}
4 changes: 2 additions & 2 deletions integration_tests/sanity/customresources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ var _ = Describe("Device Discovery Tests", func() {

By("detaching the disk")
err = physicalDisk.DetachDisk()
k8s.WaitForReconcilation()
k8s.WaitForReconciliation()

By("listing all the blockdevices")
bdList, err := k8sClient.ListBlockDevices()
Expand Down Expand Up @@ -153,7 +153,7 @@ var _ = Describe("Device Discovery Tests", func() {
By("attaching the disk")
err = physicalDisk.AttachDisk()
Expect(err).NotTo(HaveOccurred())
k8s.WaitForReconcilation()
k8s.WaitForReconciliation()

By("listing the blockdevices again")
bdList, err = k8sClient.ListBlockDevices()
Expand Down
16 changes: 8 additions & 8 deletions integration_tests/sanity/deviceclaim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var _ = Describe("BlockDevice Claim tests", func() {
ok := WaitForPodToBeRunningEventually(DaemonSetPodPrefix)
Expect(ok).To(BeTrue())

k8s.WaitForReconcilation()
k8s.WaitForReconciliation()
})
AfterEach(func() {
By("deleting the NDM deamonset")
Expand Down Expand Up @@ -91,7 +91,7 @@ var _ = Describe("BlockDevice Claim tests", func() {
By("creating BDC object")
err = k8sClient.CreateBlockDeviceClaim(blockDeviceClaim)
Expect(err).NotTo(HaveOccurred())
k8s.WaitForReconcilation()
k8s.WaitForReconciliation()

By("listing all BDCs")
bdcList, err := k8sClient.ListBlockDeviceClaims()
Expand All @@ -114,7 +114,7 @@ var _ = Describe("BlockDevice Claim tests", func() {
By("creating BDC object with unavailable capacity")
err = k8sClient.CreateBlockDeviceClaim(blockDeviceClaim)
Expect(err).NotTo(HaveOccurred())
k8s.WaitForReconcilation()
k8s.WaitForReconciliation()

By("listing all BDCs")
bdcList, err := k8sClient.ListBlockDeviceClaims()
Expand Down Expand Up @@ -162,7 +162,7 @@ var _ = Describe("BlockDevice Claim tests", func() {
By("creating BDC with matching node")
err = k8sClient.CreateBlockDeviceClaim(blockDeviceClaim)
Expect(err).NotTo(HaveOccurred())
k8s.WaitForReconcilation()
k8s.WaitForReconciliation()

By("listing all BDCs")
bdcList, err := k8sClient.ListBlockDeviceClaims()
Expand Down Expand Up @@ -193,23 +193,23 @@ var _ = Describe("BlockDevice Claim tests", func() {

})
})
Context("Unclamining a block device ", func() {
Context("Unclaiming a block device ", func() {
var bdcName string
var blockDeviceClaim *apis.BlockDeviceClaim
BeforeEach(func() {
By("building a new BDC")
bdcName = "test-bdc-1"
blockDeviceClaim = k8s.NewBDC(bdcName)
})
It("unclaimes a BD when BDC is deleted", func() {
It("unclaims a BD when BDC is deleted", func() {
blockDeviceClaim.Spec.HostName = HostName
blockDeviceClaim.Namespace = k8s.Namespace
blockDeviceClaim.Spec.Resources.Requests[apis.ResourceStorage] = BDCAvailableCapacity

By("creating BDC object")
err := k8sClient.CreateBlockDeviceClaim(blockDeviceClaim)
Expect(err).NotTo(HaveOccurred())
k8s.WaitForReconcilation()
k8s.WaitForReconciliation()

By("listing all BDCs")
bdcList, err := k8sClient.ListBlockDeviceClaims()
Expand Down Expand Up @@ -241,7 +241,7 @@ var _ = Describe("BlockDevice Claim tests", func() {
By("deleting the BDC")
err = k8sClient.DeleteBlockDeviceClaim(blockDeviceClaim)
Expect(err).NotTo(HaveOccurred())
k8s.WaitForReconcilation()
k8s.WaitForReconciliation()

// check status of BD again to check it has been released
bdList, err = k8sClient.ListBlockDevices()
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/yamls/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ data:
# filter or probe are not present in configmap

# udev-probe is default or primary probe it should be enabled to run ndm
# filterconfigs contails configs of filters. To provide a group of include
# filterconfigs contains configs of filters. To provide a group of include
# and exclude values add it as , separated string
node-disk-manager.config: |
probeconfigs:
Expand Down
2 changes: 1 addition & 1 deletion ndm-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ data:
# filter or probe are not present in configmap

# udev-probe is default or primary probe it should be enabled to run ndm
# filterconfigs contails configs of filters. To provide a group of include
# filterconfigs contains configs of filters. To provide a group of include
# and exclude values add it as , separated string
node-disk-manager.config: |
probeconfigs:
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/openebs/v1alpha1/blockdevice_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ type FileSystemInfo struct {
Mountpoint string `json:"mountPoint,omitempty"`
}

// DeviceDevLink holds the maping between type and links like by-id type or by-path type link
// DeviceDevLink holds the mapping between type and links like by-id type or by-path type link
type DeviceDevLink struct {
// Kind is the type of link like by-id or by-path.
Kind string `json:"kind,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/openebs/v1alpha1/disk_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ type Partition struct {
// 1. For DOS partition table, two hexadecimal digits will be
// used for partition type
// 2. For GPT partition table, a GUID will be present which corresponds to
// paratition type in the format of `00000000-0000-0000-0000-000000000000`
// partition type in the format of `00000000-0000-0000-0000-000000000000`
PartitionType string `json:"partitionType"`

// FileSystem contains mountpoint and filesystem type
Expand Down
2 changes: 1 addition & 1 deletion pkg/cleaner/cleaner.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (c *CleanupStatusTracker) CancelJob(bdName string) error {
// runJob creates a new cleanup job in the namespace
func (c *Cleaner) runJob(bd *v1alpha1.BlockDevice, volumeMode VolumeMode) error {

//retreive node Object to pass tolerations to the Job
// retrieve node Object to pass tolerations to the Job
nodeName := GetNodeName(bd)
selectedNode, err := c.getNodeObjectByNodeName(nodeName)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/blockdevice/blockdevice_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func (r *ReconcileBlockDevice) updateBDStatus(state openebsv1alpha1.DeviceClaimS
return nil
}

// IsReconcileDisabled is used to check if reconcilation is disabled for
// IsReconcileDisabled is used to check if reconciliation is disabled for
// BlockDevice
func IsReconcileDisabled(bd *openebsv1alpha1.BlockDevice) bool {
return bd.Annotations[ndm.OpenEBSReconcile] == "false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (r *ReconcileBlockDeviceClaim) Reconcile(request reconcile.Request) (reconc
return reconcile.Result{}, err
}

// check if reconcilation is disabled for this resource
// check if reconciliation is disabled for this resource
if IsReconcileDisabled(instance) {
return reconcile.Result{}, nil
}
Expand Down Expand Up @@ -144,7 +144,7 @@ func (r *ReconcileBlockDeviceClaim) Reconcile(request reconcile.Request) (reconc
return reconcile.Result{}, nil
}

// claimDeviceForBlockDeviceClaim is created, try to findout blockdevice which is
// claimDeviceForBlockDeviceClaim is created, try to determine blockdevice which is
// free and has size equal/greater than BlockDeviceClaim request.
func (r *ReconcileBlockDeviceClaim) claimDeviceForBlockDeviceClaim(
instance *apis.BlockDeviceClaim, reqLogger logr.Logger) error {
Expand Down Expand Up @@ -368,7 +368,7 @@ func (r *ReconcileBlockDeviceClaim) getListofDevices(filters ...string) (*apis.B
return listBlockDevice, nil
}

// IsReconcileDisabled is used to check if reconcilation is disabled for
// IsReconcileDisabled is used to check if reconciliation is disabled for
// BlockDeviceClaim
func IsReconcileDisabled(bdc *apis.BlockDeviceClaim) bool {
return bdc.Annotations[ndm.OpenEBSReconcile] == "false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func TestBlockDeviceClaimController(t *testing.T) {
r.InvalidCapacityTest(t, req)

// Create new BlockDeviceClaim CR with right capacity,
// trigger reconcilation event. This time, it should
// trigger reconciliation event. This time, it should
// bound.
deviceClaim := &openebsv1alpha1.BlockDeviceClaim{}
err := r.client.Get(context.TODO(), req.NamespacedName, deviceClaim)
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/disk/disk_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (r *ReconcileDisk) Reconcile(request reconcile.Request) (reconcile.Result,
return reconcile.Result{}, nil
}

// IsReconcileDisabled is used to check if reconcilation is disabled for
// IsReconcileDisabled is used to check if reconciliation is disabled for
// Disk resource
func IsReconcileDisabled(disk *openebsv1alpha1.Disk) bool {
return disk.Annotations[ndm.OpenEBSReconcile] == "false"
Expand Down
2 changes: 1 addition & 1 deletion pkg/hierarchy/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package hierarchy

var sysFSDirectoryPath = "/sys/"

// Device represents a blockdevice. This struct is used by hierachy pkg which is used to
// Device represents a blockdevice. This struct is used by hierarchy pkg which is used to
// get the necessary blockdevice hierarchy information
type Device struct {
// Path of the blockdevice. eg: /dev/sda, /dev/dm-0
Expand Down
2 changes: 1 addition & 1 deletion pkg/metrics/static/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (m *Metrics) withErrorRequest() *Metrics {
return m
}

// SetMetrics is used to set the prometheus metrics to resepective fields
// SetMetrics is used to set the prometheus metrics to respective fields
func (m *Metrics) SetMetrics(blockDevices []bd.BlockDevice) {
for _, blockDevice := range blockDevices {
// remove /dev from the device path so that the device path is similar to the
Expand Down
2 changes: 1 addition & 1 deletion pkg/mount/mountinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const (
hostMountFilePath = "/host/proc/1/mounts" // hostMountFilePath is the file path mounted inside container
)

// Identifier is an identifer for the mount probe. It will be a devpath like
// Identifier is an identifier for the mount probe. It will be a devpath like
// /dev/sda, /dev/sda1 etc
type Identifier struct {
DevPath string
Expand Down
4 changes: 2 additions & 2 deletions pkg/seachest/seachest.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ func SeachestErrors(err int) string {
"Bad Parameter",
"Memory Allocation Failed",
"Cmd Passthrough Failed",
"Library Mistmatch",
"Device Forzen",
"Library Mismatch",
"Device Frozen",
"Permission Denied",
"File Open Error",
"Incomplete RFTRS",
Expand Down
2 changes: 1 addition & 1 deletion pkg/setup/create_crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (sc Config) createBlockDeviceClaimCRD() error {
}

// createCRD creates a CRD in the cluster and waits for it to get into active state
// It will return error, if the CRD creation failed, or the Name conficts with other CRD already
// It will return error, if the CRD creation failed, or the Name conflicts with other CRD already
// in the group
func (sc Config) createCRD(crd *apiext.CustomResourceDefinition) error {
if _, err := sc.apiExtClient.ApiextensionsV1beta1().CustomResourceDefinitions().Create(crd); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/smart/scsiinquirypage.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
)

// commands used to fetch various informations of a disk from a set of defined
// commands used to fetch various information of a disk from a set of defined
// scsi pages
const (
SCSIInquiry = 0x12 // inquiry command
Expand Down
Loading

0 comments on commit 5b18203

Please sign in to comment.