diff --git a/ADOPTERS.md b/ADOPTERS.md index 9f4e6c3ab..47a85d5a6 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -31,7 +31,7 @@ to share the details of their usage publicly at this time. to accelerate the growth of the Canadian Information and Communications Technology (ICT) sector. The Rook Ceph operator is key to the Kubernetes clusters frequently set up for projects by small-medium enterprises in the CENGN labs. -* [Avisi](https://www.avisi.nl/) develops and operates software for organizations like the the Dutch +* [Avisi](https://www.avisi.nl/) develops and operates software for organizations like the Dutch Notary Association. They have survived multiple disaster scenarios already with Rook and it has made their cloud native journey in the private cloud so much easier by providing a powerful tool that lets them take advantage of a mature storage product with ease and peace of mind. diff --git a/Documentation/CRDs/Block-Storage/ceph-block-pool-rados-namespace-crd.md b/Documentation/CRDs/Block-Storage/ceph-block-pool-rados-namespace-crd.md index 371ad50d4..91d6c6302 100644 --- a/Documentation/CRDs/Block-Storage/ceph-block-pool-rados-namespace-crd.md +++ b/Documentation/CRDs/Block-Storage/ceph-block-pool-rados-namespace-crd.md @@ -16,7 +16,7 @@ docs](https://docs.ceph.com/en/latest/man/8/rbd/) Having multiple namespaces in a pool would allow multiple Kubernetes clusters to share one unique ceph cluster without creating a pool per kubernetes cluster -and it will also allow to have tenant isolation between multiple tenenats in a +and it will also allow to have tenant isolation between multiple tenants in a single Kubernetes cluster without creating multiple pools for tenants. Rook allows creation of Ceph BlockPool diff --git a/Documentation/CRDs/ceph-client-crd.md b/Documentation/CRDs/ceph-client-crd.md index 9f16a55d6..46620a0fd 100644 --- a/Documentation/CRDs/ceph-client-crd.md +++ b/Documentation/CRDs/ceph-client-crd.md @@ -7,7 +7,7 @@ For more information about user management and capabilities see the [Ceph docs]( ## Use Case -Use Client CRD in case you want to integrate Rook with with applications that are using LibRBD directly. +Use Client CRD in case you want to integrate Rook with applications that are using LibRBD directly. For example for OpenStack deployment with Ceph backend use Client CRD to create OpenStack services users. The Client CRD is not needed for Flex or CSI driver users. The drivers create the needed users automatically. diff --git a/Documentation/Storage-Configuration/Advanced/ceph-mon-health.md b/Documentation/Storage-Configuration/Advanced/ceph-mon-health.md index a220c8b1f..169c78b6e 100644 --- a/Documentation/Storage-Configuration/Advanced/ceph-mon-health.md +++ b/Documentation/Storage-Configuration/Advanced/ceph-mon-health.md @@ -36,7 +36,7 @@ Rook allows an even number of mons for higher durability. See the [disaster reco The number of mons to create in a cluster depends on your tolerance for losing a node. If you have 1 mon zero nodes can be lost to maintain quorum. With 3 mons one node can be lost, and with 5 mons two nodes can be lost. Because the Rook operator will automatically -start a new new monitor if one dies, you typically only need three mons. The more mons you have, the more overhead there will be to make +start a new monitor if one dies, you typically only need three mons. The more mons you have, the more overhead there will be to make a change to the cluster, which could become a performance issue in a large cluster. ## Mitigating Monitor Failure diff --git a/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-drivers.md b/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-drivers.md index f605176de..8ca0c7cab 100644 --- a/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-drivers.md +++ b/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-drivers.md @@ -12,7 +12,7 @@ There are three CSI drivers integrated with Rook that will enable different scen pods, or the exports can be mounted directly via an NFS client from inside or outside the Kubernetes cluster. [More information](../../CRDs/ceph-nfs-crd.md#ceph-csi-nfs-provisioner-and-nfs-csi-driver). -The Ceph Filesysetem (CephFS) and RADOS Block Device (RBD) drivers are enabled automatically with +The Ceph Filesystem (CephFS) and RADOS Block Device (RBD) drivers are enabled automatically with the Rook operator. The NFS driver is disabled by default. All drivers will be started in the same namespace as the operator when the first CephCluster CR is created. diff --git a/Documentation/Storage-Configuration/Monitoring/ceph-monitoring.md b/Documentation/Storage-Configuration/Monitoring/ceph-monitoring.md index 8edcd6561..f99d7a890 100644 --- a/Documentation/Storage-Configuration/Monitoring/ceph-monitoring.md +++ b/Documentation/Storage-Configuration/Monitoring/ceph-monitoring.md @@ -240,7 +240,7 @@ a service and service monitor. kubectl create -f csi-metrics-service-monitor.yaml ``` -This will create the service monitor to have promethues monitor CSI +This will create the service monitor to have prometheus monitor CSI ### Collecting RBD per-image IO statistics @@ -290,6 +290,6 @@ spec: serverAddress: http://rook-prometheus.rook-ceph.svc:9090 metricName: collecting_ceph_rgw_put query: | - sum(rate(ceph_rgw_put[2m])) # promethues query used for autoscaling + sum(rate(ceph_rgw_put[2m])) # prometheus query used for autoscaling threshold: "90" ``` diff --git a/Documentation/Storage-Configuration/Object-Storage-RGW/ceph-object-bucket-claim.md b/Documentation/Storage-Configuration/Object-Storage-RGW/ceph-object-bucket-claim.md index 1e1a7149d..04767bf94 100644 --- a/Documentation/Storage-Configuration/Object-Storage-RGW/ceph-object-bucket-claim.md +++ b/Documentation/Storage-Configuration/Object-Storage-RGW/ceph-object-bucket-claim.md @@ -8,7 +8,7 @@ Rook supports the creation of new buckets and access to existing buckets via two * an `Object Bucket (OB)` is a custom resource automatically generated when a bucket is provisioned. It is a global resource, typically not visible to non-admin users, and contains information specific to the bucket. It is described by an OB CRD, also shown below. An OBC references a storage class which is created by an administrator. The storage class defines whether the bucket requested is a new bucket or an existing bucket. It also defines the bucket retention policy. -Users request a new or existing bucket by creating an OBC which is shown below. The ceph provisioner detects the OBC and creates a new bucket or grants access to an existing bucket, depending the the storage class referenced in the OBC. It also generates a Secret which provides credentials to access the bucket, and a ConfigMap which contains the bucket's endpoint. Application pods consume the information in the Secret and ConfigMap to access the bucket. Please note that to make provisioner watch the cluster namespace only you need to set `ROOK_OBC_WATCH_OPERATOR_NAMESPACE` to `true` in the operator manifest, otherwise it watches all namespaces. +Users request a new or existing bucket by creating an OBC which is shown below. The ceph provisioner detects the OBC and creates a new bucket or grants access to an existing bucket, depending the storage class referenced in the OBC. It also generates a Secret which provides credentials to access the bucket, and a ConfigMap which contains the bucket's endpoint. Application pods consume the information in the Secret and ConfigMap to access the bucket. Please note that to make provisioner watch the cluster namespace only you need to set `ROOK_OBC_WATCH_OPERATOR_NAMESPACE` to `true` in the operator manifest, otherwise it watches all namespaces. ## Example diff --git a/Documentation/Storage-Configuration/Object-Storage-RGW/ceph-object-multisite.md b/Documentation/Storage-Configuration/Object-Storage-RGW/ceph-object-multisite.md index db3ebc9ef..f7934b327 100644 --- a/Documentation/Storage-Configuration/Object-Storage-RGW/ceph-object-multisite.md +++ b/Documentation/Storage-Configuration/Object-Storage-RGW/ceph-object-multisite.md @@ -167,7 +167,7 @@ kubectl create -f realm-a-keys.yaml Once the admin knows the endpoint and the secret for the keys has been created, the admin should create: 1. A [CephObjectRealm](../../CRDs/Object-Storage/ceph-object-multisite-crd.md#object-realm-settings) matching to the realm on the other Ceph cluster, with an endpoint as described above. -1. A [CephObjectZoneGroup](../../CRDs/Object-Storage/ceph-object-multisite-crd.md#object-zone-group-settings) matching the master zone group name or the master CephObjectZoneGroup from the cluster the the realm was pulled from. +1. A [CephObjectZoneGroup](../../CRDs/Object-Storage/ceph-object-multisite-crd.md#object-zone-group-settings) matching the master zone group name or the master CephObjectZoneGroup from the cluster the realm was pulled from. 1. A [CephObjectZone](../../CRDs/Object-Storage/ceph-object-multisite-crd.md#object-zone-settings) referring to the CephObjectZoneGroup created above. 1. A CephObjectStore referring to the new CephObjectZone resource. diff --git a/Documentation/Storage-Configuration/Object-Storage-RGW/object-storage.md b/Documentation/Storage-Configuration/Object-Storage-RGW/object-storage.md index 5cb77e2ad..89db23216 100644 --- a/Documentation/Storage-Configuration/Object-Storage-RGW/object-storage.md +++ b/Documentation/Storage-Configuration/Object-Storage-RGW/object-storage.md @@ -364,6 +364,6 @@ kubectl -n rook-ceph get secret rook-ceph-object-user-my-store-my-user -o jsonpa Multisite is a feature of Ceph that allows object stores to replicate its data over multiple Ceph clusters. -Multisite also allows object stores to be independent and isloated from other object stores in a cluster. +Multisite also allows object stores to be independent and isolated from other object stores in a cluster. For more information on multisite please read the [ceph multisite overview](ceph-object-multisite.md) for how to run it. diff --git a/Documentation/Troubleshooting/ceph-common-issues.md b/Documentation/Troubleshooting/ceph-common-issues.md index 70ac181bb..c55672c37 100644 --- a/Documentation/Troubleshooting/ceph-common-issues.md +++ b/Documentation/Troubleshooting/ceph-common-issues.md @@ -648,7 +648,7 @@ workaround are still at risk for OSD failures in the future. To resolve the issue, immediately update to v1.6.8 or higher. After the update, no corruption should occur on OSDs created in the future. Next, to get back to a healthy Ceph cluster state, focus on one -corruped disk at a time and [remove all OSDs on each corrupted disk](../Storage-Configuration/Advanced/ceph-osd-mgmt.md#remove-an-osd) +corrupted disk at a time and [remove all OSDs on each corrupted disk](../Storage-Configuration/Advanced/ceph-osd-mgmt.md#remove-an-osd) one disk at a time. As an example, you may have `/dev/sdb` with two unexpected partitions (`/dev/sdb2` and `/dev/sdb3`) @@ -665,7 +665,7 @@ as well as a second corrupted disk `/dev/sde` with one unexpected partition (`/d See [the teardown document](../Storage-Configuration/ceph-teardown.md#zapping-devices) for details. 4. After this, scale up the Rook operator to deploy a new OSD to `/dev/sdb`. This will allow Ceph to use `/dev/sdb` for data recovery and replication while the next OSDs are removed. -5. Now Repeat steps 1-4 for `/dev/sde` and `/dev/sde2`, and continue for any other corruped disks. +5. Now Repeat steps 1-4 for `/dev/sde` and `/dev/sde2`, and continue for any other corrupted disks. If your Rook-Ceph cluster does not have any critical data stored in it, it may be simpler to uninstall Rook completely and redeploy with v1.6.8 or higher. diff --git a/Documentation/Troubleshooting/ceph-csi-common-issues.md b/Documentation/Troubleshooting/ceph-csi-common-issues.md index 1f381a85f..9a5807c40 100644 --- a/Documentation/Troubleshooting/ceph-csi-common-issues.md +++ b/Documentation/Troubleshooting/ceph-csi-common-issues.md @@ -301,7 +301,7 @@ The external-attacher is a sidecar container that attaches volumes to nodes by c running in Kubernetes controller-manager does not have any direct interfaces to CSI drivers. More details can be found [here](https://github.com/kubernetes-csi/external-attacher). -If any issue exists in attaching the PVC to the application pod first check the volumettachment object created +If any issue exists in attaching the PVC to the application pod first check the volumeattachment object created and also log from csi-attacher sidecar container in provisioner pod. ```console diff --git a/Documentation/Troubleshooting/common-issues.md b/Documentation/Troubleshooting/common-issues.md index bab9ea11b..22ef48ab3 100644 --- a/Documentation/Troubleshooting/common-issues.md +++ b/Documentation/Troubleshooting/common-issues.md @@ -11,7 +11,7 @@ For common issues specific to Ceph, see the [Ceph Common Issues](ceph-common-iss ## Troubleshooting Techniques -Kubernetes status and logs are the the main resources needed to investigate issues in any Rook cluster. +Kubernetes status and logs are the main resources needed to investigate issues in any Rook cluster. ## Kubernetes Tools diff --git a/Documentation/Upgrade/ceph-upgrade.md b/Documentation/Upgrade/ceph-upgrade.md index 67c88a906..a5992ea05 100644 --- a/Documentation/Upgrade/ceph-upgrade.md +++ b/Documentation/Upgrade/ceph-upgrade.md @@ -5,7 +5,7 @@ title: Ceph Upgrades This guide will walk you through the steps to upgrade the version of Ceph in a Rook cluster. Rook and Ceph upgrades are designed to ensure data remains available even while the upgrade is proceeding. Rook will perform the upgrades in a rolling fashion -such that application pods are are not disrupted. +such that application pods are not disrupted. Rook is cautious when performing upgrades. When an upgrade is requested (the Ceph image has been updated in the CR), Rook will go through all the daemons one by one and will individually perform diff --git a/Documentation/Upgrade/health-verification.md b/Documentation/Upgrade/health-verification.md index 09bc772a3..460775423 100644 --- a/Documentation/Upgrade/health-verification.md +++ b/Documentation/Upgrade/health-verification.md @@ -4,7 +4,7 @@ title: Health Verification Rook and Ceph upgrades are designed to ensure data remains available even while the upgrade is proceeding. Rook will perform the upgrades in a rolling fashion -such that application pods are are not disrupted. To ensure the upgrades are +such that application pods are not disrupted. To ensure the upgrades are seamless, it is important to begin the upgrades with Ceph in a fully healthy state. Let's first review some ways that you can verify the health of your cluster. diff --git a/deploy/charts/rook-ceph-cluster/values.yaml b/deploy/charts/rook-ceph-cluster/values.yaml index 63b4d8766..008cb55fd 100644 --- a/deploy/charts/rook-ceph-cluster/values.yaml +++ b/deploy/charts/rook-ceph-cluster/values.yaml @@ -87,7 +87,7 @@ cephClusterSpec: # WaitTimeoutForHealthyOSDInMinutes defines the time (in minutes) the operator would wait before an OSD can be stopped for upgrade or restart. # If the timeout exceeds and OSD is not ok to stop, then the operator would skip upgrade for the current OSD and proceed with the next one - # if `continueUpgradeAfterChecksEvenIfNotHealthy` is `false`. If `continueUpgradeAfterChecksEvenIfNotHealthy` is `true`, then opertor would + # if `continueUpgradeAfterChecksEvenIfNotHealthy` is `false`. If `continueUpgradeAfterChecksEvenIfNotHealthy` is `true`, then operator would # continue with the upgrade of an OSD even if its not ok to stop after the timeout. This timeout won't be applied if `skipUpgradeChecks` is `true`. # The default wait timeout is 10 minutes. waitTimeoutForHealthyOSDInMinutes: 10 diff --git a/deploy/charts/rook-ceph/values.yaml b/deploy/charts/rook-ceph/values.yaml index b3bbd633e..d71b2a5f7 100644 --- a/deploy/charts/rook-ceph/values.yaml +++ b/deploy/charts/rook-ceph/values.yaml @@ -322,7 +322,7 @@ csi: memory: 1Gi cpu: 500m - # Set provisonerTolerations and provisionerNodeAffinity for provisioner pod. + # Set provisionerTolerations and provisionerNodeAffinity for provisioner pod. # The CSI provisioner would be best to start on the same nodes as other ceph daemons. # provisionerTolerations: # - key: key diff --git a/deploy/examples/cluster.yaml b/deploy/examples/cluster.yaml index 549915852..d28f48c63 100644 --- a/deploy/examples/cluster.yaml +++ b/deploy/examples/cluster.yaml @@ -39,7 +39,7 @@ spec: continueUpgradeAfterChecksEvenIfNotHealthy: false # WaitTimeoutForHealthyOSDInMinutes defines the time (in minutes) the operator would wait before an OSD can be stopped for upgrade or restart. # If the timeout exceeds and OSD is not ok to stop, then the operator would skip upgrade for the current OSD and proceed with the next one - # if `continueUpgradeAfterChecksEvenIfNotHealthy` is `false`. If `continueUpgradeAfterChecksEvenIfNotHealthy` is `true`, then opertor would + # if `continueUpgradeAfterChecksEvenIfNotHealthy` is `false`. If `continueUpgradeAfterChecksEvenIfNotHealthy` is `true`, then operator would # continue with the upgrade of an OSD even if its not ok to stop after the timeout. This timeout won't be applied if `skipUpgradeChecks` is `true`. # The default wait timeout is 10 minutes. waitTimeoutForHealthyOSDInMinutes: 10 diff --git a/deploy/examples/create-external-cluster-resources.py b/deploy/examples/create-external-cluster-resources.py index b086cc242..0c94a085e 100644 --- a/deploy/examples/create-external-cluster-resources.py +++ b/deploy/examples/create-external-cluster-resources.py @@ -667,9 +667,9 @@ class RadosJSON: def _join_host_port(self, endpoint, port): port = "{}".format(port) # regex to check the given endpoint is enclosed in square brackets - ipv6_regx = re.compile(r"^\[[^]]*\]$") + ipv6_regex = re.compile(r"^\[[^]]*\]$") # endpoint has ':' in it and if not (already) enclosed in square brackets - if endpoint.count(":") and not ipv6_regx.match(endpoint): + if endpoint.count(":") and not ipv6_regex.match(endpoint): endpoint = "[{}]".format(endpoint) if not port: return endpoint diff --git a/deploy/examples/dashboard-ingress-https.yaml b/deploy/examples/dashboard-ingress-https.yaml index e3cfa3639..114e7288b 100644 --- a/deploy/examples/dashboard-ingress-https.yaml +++ b/deploy/examples/dashboard-ingress-https.yaml @@ -1,5 +1,5 @@ # -# This example is for Kubernetes running an ngnix-ingress +# This example is for Kubernetes running an nginx-ingress # and an ACME (e.g. Let's Encrypt) certificate service # # The nginx-ingress annotations support the dashboard diff --git a/deploy/examples/monitoring/csi-metrics-service-monitor.yaml b/deploy/examples/monitoring/csi-metrics-service-monitor.yaml index ba43fbd2c..ea223d53f 100644 --- a/deploy/examples/monitoring/csi-metrics-service-monitor.yaml +++ b/deploy/examples/monitoring/csi-metrics-service-monitor.yaml @@ -17,7 +17,7 @@ spec: - port: csi-http-metrics path: /metrics interval: 5s - # comment csi-grpc-metrics realated information if csi grpc metrics is not enabled + # comment csi-grpc-metrics related information if csi grpc metrics is not enabled - port: csi-grpc-metrics path: /metrics interval: 5s diff --git a/deploy/examples/monitoring/localrules.yaml b/deploy/examples/monitoring/localrules.yaml index 5fd180703..a6f143b55 100644 --- a/deploy/examples/monitoring/localrules.yaml +++ b/deploy/examples/monitoring/localrules.yaml @@ -293,7 +293,7 @@ spec: description: | The device health module has determined that the number of devices predicted to fail can not be remediated automatically, since it would take too many osd's out of - the cluster, impacting performance and potentially availabililty. You should add new + the cluster, impacting performance and potentially availability. You should add new OSDs to the cluster to allow data to be relocated to avoid the data integrity issues. - alert: CephDeviceFailureRelocationIncomplete expr: ceph_health_detail{name="DEVICE_HEALTH_IN_USE"} == 1 @@ -309,7 +309,7 @@ spec: soon, but the normal process of relocating the data on the device to other OSDs in the cluster is blocked. - Check the the cluster has available freespace. It may be necessary to add + Check the cluster has available freespace. It may be necessary to add more disks to the cluster to allow the data from the failing device to successfully migrate. @@ -525,7 +525,7 @@ spec: type: ceph_default oid: 1.3.6.1.4.1.50495.1.2.1.7.2 annotations: - summary: One or more platcment groups are marked unclean + summary: One or more placement groups are marked unclean description: > {{ $value }} PGs haven't been clean for more than 15 minutes in pool {{ $labels.name }}. Unclean PGs haven't been able to completely recover from a previous failure. @@ -559,7 +559,7 @@ spec: description: > Data redundancy may be reduced, or is at risk, since one or more OSDs are at or above their 'full' threshold. Add more capacity to the cluster, or delete unwanted data. - - alert: CephPGUnavilableBlockingIO + - alert: CephPGUnavailableBlockingIO # PG_AVAILABILITY, but an OSD is not in a DOWN state expr: ((ceph_health_detail{name="PG_AVAILABILITY"} == 1) - scalar(ceph_health_detail{name="OSD_DOWN"})) == 1 for: 1m @@ -597,7 +597,7 @@ spec: summary: Placement group(s) have not been scrubbed description: | One or more PGs have not been scrubbed recently. The scrub process is a data integrity - feature, protectng against bit-rot. It checks that objects and their metadata (size and + feature, protecting against bit-rot. It checks that objects and their metadata (size and attributes) match across object replicas. When PGs miss their scrub window, it may indicate the scrub window is too small, or PGs were not in a 'clean' state during the scrub window. @@ -630,7 +630,7 @@ spec: summary: Placement group(s) have not been deep scrubbed description: | One or more PGs have not been deep scrubbed recently. Deep scrub is a data integrity - feature, protectng against bit-rot. It compares the contents of objects and their + feature, protecting against bit-rot. It compares the contents of objects and their replicas for inconsistency. When PGs miss their deep scrub window, it may indicate that the window is too small or PGs were not in a 'clean' state during the deep-scrub window. @@ -767,7 +767,7 @@ spec: annotations: summary: One or more Ceph pools are getting full description: | - A pool has exceeeded it warning (percent full) threshold, or the OSDs + A pool has exceeded it warning (percent full) threshold, or the OSDs supporting the pool have reached their NEARFULL thresholds. Writes may continue, but you are at risk of the pool going read only if more capacity isn't made available. diff --git a/deploy/examples/nfs.yaml b/deploy/examples/nfs.yaml index f7afd0990..e665daa21 100644 --- a/deploy/examples/nfs.yaml +++ b/deploy/examples/nfs.yaml @@ -44,7 +44,7 @@ spec: labels: # key: value - # Resource equests and limits to apply to NFS server pods + # Resource requests and limits to apply to NFS server pods resources: # limits: # cpu: "500m" diff --git a/deploy/examples/operator-openshift.yaml b/deploy/examples/operator-openshift.yaml index 40fa5edad..8a4900e87 100644 --- a/deploy/examples/operator-openshift.yaml +++ b/deploy/examples/operator-openshift.yaml @@ -61,7 +61,7 @@ allowHostNetwork: true # This need to be set to true as we use HostPath allowHostDirVolumePlugin: true priority: -# SYS_ADMIN is needed for rbd to execture rbd map command +# SYS_ADMIN is needed for rbd to execute rbd map command allowedCapabilities: ["SYS_ADMIN"] # Needed as we run liveness container on daemonset pods allowHostPorts: true @@ -449,7 +449,6 @@ data: # memory: 256Mi # cpu: 100m - # (Optional) CEPH CSI NFS provisioner resource requirement list, Put here list of resource # requests and limits you want to apply for provisioner pod # CSI_NFS_PROVISIONER_RESOURCE: | diff --git a/deploy/examples/operator.yaml b/deploy/examples/operator.yaml index f97d986f5..60b8ef95e 100644 --- a/deploy/examples/operator.yaml +++ b/deploy/examples/operator.yaml @@ -411,7 +411,7 @@ data: # memory: 1Gi # cpu: 500m - # Configure CSI CSI Ceph FS grpc and liveness metrics port + # Configure CSI Ceph FS grpc and liveness metrics port # CSI_CEPHFS_GRPC_METRICS_PORT: "9091" # CSI_CEPHFS_LIVENESS_METRICS_PORT: "9081" # Configure CSI RBD grpc and liveness metrics port diff --git a/deploy/olm/generate-rook-csv.sh b/deploy/olm/generate-rook-csv.sh index a5293b481..1d1b4f578 100755 --- a/deploy/olm/generate-rook-csv.sh +++ b/deploy/olm/generate-rook-csv.sh @@ -239,7 +239,7 @@ export DO_NOT_INCLUDE_POD_SECURITY_POLICY_RESOURCES=true export ADDITIONAL_HELM_CLI_OPTIONS="--set csi.nfs.enabled=true" ./build/rbac/get-helm-rbac.sh > "$OLM_RBAC_YAML_FILE" -# TODO: do we need separate clusterrole/clusterrolebinding/role/rolebinding/servicaccount files, or +# TODO: do we need separate clusterrole/clusterrolebinding/role/rolebinding/serviceaccount files, or # can these just stay in rbac.yaml? If they need to be separate, we can do that here with YQ. generate_csv "$@" diff --git a/design/ceph/ceph-managed-disruptionbudgets.md b/design/ceph/ceph-managed-disruptionbudgets.md index 236009e74..ec7c6a08a 100644 --- a/design/ceph/ceph-managed-disruptionbudgets.md +++ b/design/ceph/ceph-managed-disruptionbudgets.md @@ -13,7 +13,7 @@ ### OSDs OSDs do not fit under the single PodDisruptionBudget pattern. Ceph's ability to tolerate pod disruptions in one failure domain is dependent on the overall health of the cluster. -Even if an upgrade agent were only to drain one node at a time, Ceph would have to wait until there were no undersized PGs before moving on the the next. +Even if an upgrade agent were only to drain one node at a time, Ceph would have to wait until there were no undersized PGs before moving on the next. The failure domain will be determined by the smallest failure domain of all the Ceph Pools in that cluster. We begin with creating a single PodDisruptionBudget for all the OSD with maxUnavailable=1. This will allow one OSD to go down anytime. Once the user drains a node and an OSD goes down, we determine the failure domain for the draining OSD (using the OSD deployment labels). Then we create blocking PodDisruptionBudgets (maxUnavailable=0) for all other failure domains and delete the main PodDisruptionBudget. This blocks OSDs from going down in multiple failure domains simultaneously. @@ -56,7 +56,7 @@ An OSD can be down due to reasons other than node drain, say, disk failure. In s ### Mon, Mgr, MDS, RGW, RBDMirror -Since there is no strict failure domain requirement for each of these, and they are not logically grouped, a stactic PDB will suffice. +Since there is no strict failure domain requirement for each of these, and they are not logically grouped, a static PDB will suffice. A single PodDisruptionBudget is created and owned by the respective controllers, and updated only according to changes in the CRDs that change the amount of pods. diff --git a/design/ceph/ceph-openshift-fencing-mitigation.md b/design/ceph/ceph-openshift-fencing-mitigation.md index 1b0cbec0e..061fb765d 100644 --- a/design/ceph/ceph-openshift-fencing-mitigation.md +++ b/design/ceph/ceph-openshift-fencing-mitigation.md @@ -38,7 +38,7 @@ else, maxUnavailable = 0. We can share a ceph health cache with the other controller-runtime reconcilers that have to watch the PG "cleanliness". -The MDB will target `Machine`s selected by a label maintainted by the `machine-controller`. The label is `fencegroup.rook.io/`. +The MDB will target `Machine`s selected by a label maintained by the `machine-controller`. The label is `fencegroup.rook.io/`. ## machine-controller This controller watches OSDs and `Machine`s. It ensures that each `Machine` with OSDs from a `CephCluster` have the label `fencegroup.rook.io/`, and those that do not have running OSDs do not have label. @@ -68,5 +68,5 @@ This will ensure that no `Machine` without running OSDs will be protected by the - MachineHealthCheck fences the Node. - Ceph resources on the node go down. - Some Ceph PGs are now not active+clean. - - machinedisruptionbudget-controller sets maxUnavailble to 0 on the MachineDisruptionBudget. + - machinedisruptionbudget-controller sets maxUnavailable to 0 on the MachineDisruptionBudget. - If another labeled node needs to be fenced, it will only happen after the Ceph PGs become active+clean again when the OSDs are rescheduled and backfilled. diff --git a/design/ceph/object/ceph-multisite-overview.md b/design/ceph/object/ceph-multisite-overview.md index c0c2820b5..4ac040b82 100644 --- a/design/ceph/object/ceph-multisite-overview.md +++ b/design/ceph/object/ceph-multisite-overview.md @@ -60,7 +60,7 @@ To enable Ceph's multisite, the following steps need to happen. 2. If an admins pulls a realm on a Rook Ceph cluster from another Ceph cluster, the admin should create: - A [ceph-object-realm](/design/ceph/object/realm.md) referring to the realm on the other Ceph cluster, and an endpoint in a master zone in that realm. - - A [ceph-object-zone-group](/design/ceph/object/zone-group.md) referring to the realm that was pulled or matching the ceph-object-zone-group resource from the cluster the the realm was pulled from. + - A [ceph-object-zone-group](/design/ceph/object/zone-group.md) referring to the realm that was pulled or matching the ceph-object-zone-group resource from the cluster the realm was pulled from. - A [ceph-object-zone](/design/ceph/object/zone.md) referring to the zone group that the new zone will be in. - A [ceph-object-store](/design/ceph/object/store.md) referring to the ceph-object-zone resource. diff --git a/design/ceph/object/store.md b/design/ceph/object/store.md index 311b1883b..4ec577a10 100644 --- a/design/ceph/object/store.md +++ b/design/ceph/object/store.md @@ -109,7 +109,7 @@ By default, the object store will be created independently from any other object If desired to configure the object store to replicate and sync data amongst object-store or Ceph clusters, the `zone` section would be required. -This section enables the the object store to be part of a specified ceph-object-zone. +This section enables the object store to be part of a specified ceph-object-zone. Specifying this section also ensures that the pool section in the ceph-object-zone is used for the object-store. If pools are specified for the object-store they are neither created nor deleted. diff --git a/design/ceph/object/zone.md b/design/ceph/object/zone.md index 6e055512b..03a50d01b 100644 --- a/design/ceph/object/zone.md +++ b/design/ceph/object/zone.md @@ -70,7 +70,7 @@ A [ceph-object-pull-realm](/design/object/ceph-object-pull-realm.md) resource mu Once the ceph-object-pull-realm is configured a ceph-object-zone must be created. -After an ceph-object-store is configured to be in this ceph-object-zone, the all Cehph multisite resources will be running and data between the two clusters will start syncing. +After an ceph-object-store is configured to be in this ceph-object-zone, the all Ceph multisite resources will be running and data between the two clusters will start syncing. ## Deleting and Reconfiguring the Ceph Object Zone diff --git a/design/ceph/resource-constraints.md b/design/ceph/resource-constraints.md index d137feb99..b43871e46 100644 --- a/design/ceph/resource-constraints.md +++ b/design/ceph/resource-constraints.md @@ -10,7 +10,7 @@ The CPU limits would merely limit the "throughput" of the component when reachin ## Application of Resource Constraints The resource constraints are defined in the rook Cluster, Filesystem and RGW CRDs. -The default is to not set resource requirements, this translates to the `qosClasss: BestEffort` (`qosClasss` will be later on explained in [Automatic Algorithm](#automatic-algorithm)). +The default is to not set resource requirements, this translates to the `qosClass: BestEffort` (`qosClass` will be later on explained in [Automatic Algorithm](#automatic-algorithm)). ### Automatic Algorithm The user is able to enable and disable the automatic resource algorithm as he wants. diff --git a/design/ceph/rook-ceph-status-conditions.md b/design/ceph/rook-ceph-status-conditions.md index ba76e9726..51c6f07b3 100644 --- a/design/ceph/rook-ceph-status-conditions.md +++ b/design/ceph/rook-ceph-status-conditions.md @@ -39,7 +39,7 @@ We can add Conditions simply in the Custom Resource struct as: type ClusterStatus struct{ FinalCondition ConditionType `json:"finalcondition,omitempty"` - Message string `json:"message,omitmepty"` + Message string `json:"message,omitempty"` Condition []RookConditions `json:"conditions,omitempty"` CephStatus *CephStatus `json:"ceph,omitempty"` } diff --git a/design/ceph/security-model.md b/design/ceph/security-model.md index b8472d720..e97030b19 100644 --- a/design/ceph/security-model.md +++ b/design/ceph/security-model.md @@ -30,7 +30,7 @@ metadata: name: rook-operator rules: - apiGroups: [""] - resources: ["namespaces", "serviceaccounts", "secrets", "pods", "services", "nodes", "nodes/proxy", "configmaps", "events", "persistenvolumes", "persistentvolumeclaims"] + resources: ["namespaces", "serviceaccounts", "secrets", "pods", "services", "nodes", "nodes/proxy", "configmaps", "events", "persistentvolumes", "persistentvolumeclaims"] verbs: [ "get", "list", "watch", "patch", "create", "update", "delete" ] - apiGroups: ["extensions"] resources: ["thirdpartyresources", "deployments", "daemonsets", "replicasets"] @@ -79,7 +79,7 @@ metadata: name: rook-ceph-agent rules: - apiGroups: [""] - resources: ["pods", "secrets", "configmaps", "persistenvolumes", "nodes", "nodes/proxy"] + resources: ["pods", "secrets", "configmaps", "persistentvolumes", "nodes", "nodes/proxy"] verbs: [ "get", "list" ] - apiGroups: ["storage.k8s.io"] resources: ["storageclasses"] diff --git a/design/ceph/storage-class-device-set.md b/design/ceph/storage-class-device-set.md index f6323a1cf..2f7a9f48f 100644 --- a/design/ceph/storage-class-device-set.md +++ b/design/ceph/storage-class-device-set.md @@ -130,7 +130,7 @@ were originally designed to be ephemeral, but it turns out that orchestrators like DeepSea store them permanently in order to have a source of truth when (re-)provisioning OSDs. Also, Drive Groups were originally designed to be host specific. But the concept of hosts is not really required for the Drive Group -data structure make sense, as they only select a subset of a set of aviailble +data structure make sense, as they only select a subset of a set of available drives. DeepSea has a documentation of [some example drive diff --git a/design/ceph/update-osds-in-parallel.md b/design/ceph/update-osds-in-parallel.md index 2cc4f8cac..59f6afc68 100644 --- a/design/ceph/update-osds-in-parallel.md +++ b/design/ceph/update-osds-in-parallel.md @@ -9,7 +9,7 @@ support large clusters, Rook should be able to update (and upgrade) multiple OSD ## High-level requirements -### Ability to set a maximumum number of OSDs to be updated simultaneously +### Ability to set a maximum number of OSDs to be updated simultaneously In the worst (but unlikely) case, all OSDs which are updated for a given parallel update operation might fail to come back online after they are updated. Users may wish to limit the number of OSDs updated in parallel in order to avoid too many OSDs failing in this way. @@ -109,7 +109,7 @@ The plan was to identify OSD Deployments which need updated by looking at the OS (1) a `rook-version` label that does not match the current version of the Rook operator AND/OR (2) a `ceph-version` label that does not match the current Ceph version being deployed. This is an invalid optimization that does not account for OSD Deployments changing due to CephCluster resource -updates. Instead of trying to optimize, it is better to always update OSD Deplyments and rely on the +updates. Instead of trying to optimize, it is better to always update OSD Deployments and rely on the lower level update calls to finish quickly when there is no update to apply. ### User configuration diff --git a/pkg/apis/ceph.rook.io/v1/placement_test.go b/pkg/apis/ceph.rook.io/v1/placement_test.go index 00ca43287..c8dc8115c 100644 --- a/pkg/apis/ceph.rook.io/v1/placement_test.go +++ b/pkg/apis/ceph.rook.io/v1/placement_test.go @@ -271,7 +271,7 @@ func placementTestGetTopologySpreadConstraints(topologyKey string) []v1.Topology { MaxSkew: 1, TopologyKey: topologyKey, - WhenUnsatisfiable: "DoNotScheudule", + WhenUnsatisfiable: "DoNotSchedule", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{"foo": "bar"}, }, diff --git a/pkg/apis/ceph.rook.io/v1/storage_test.go b/pkg/apis/ceph.rook.io/v1/storage_test.go index 561fc96fb..14eec273e 100644 --- a/pkg/apis/ceph.rook.io/v1/storage_test.go +++ b/pkg/apis/ceph.rook.io/v1/storage_test.go @@ -54,7 +54,7 @@ func TestNodeExists(t *testing.T) { } func TestResolveNodeNotExist(t *testing.T) { - // a non existing node should return nil + // a nonexistent node should return nil storageSpec := StorageScopeSpec{} node := storageSpec.ResolveNode("fake node") assert.Nil(t, node) diff --git a/pkg/daemon/ceph/client/image.go b/pkg/daemon/ceph/client/image.go index 3495aff78..c404d7b16 100644 --- a/pkg/daemon/ceph/client/image.go +++ b/pkg/daemon/ceph/client/image.go @@ -81,7 +81,7 @@ func CreateImage(context *clusterd.Context, clusterInfo *ClusterInfo, name, pool size = ImageMinSize } - // Roundup the size of the volume image since we only create images on 1MB bundaries and we should never create an image + // Roundup the size of the volume image since we only create images on 1MB boundaries and we should never create an image // size that's smaller than the requested one, e.g, requested 1048698 bytes should be 2MB while not be truncated to 1MB sizeMB := int((size + ImageMinSize - 1) / ImageMinSize) diff --git a/pkg/daemon/ceph/client/info.go b/pkg/daemon/ceph/client/info.go index b4a736675..2fbdecdbe 100644 --- a/pkg/daemon/ceph/client/info.go +++ b/pkg/daemon/ceph/client/info.go @@ -51,7 +51,7 @@ type ClusterInfo struct { // A context to cancel the context it is used to determine whether the reconcile loop should // exist (if the context has been cancelled). This cannot be in main clusterd context since this // is a pointer passed through the entire life cycle or the operator. If the context is - // cancelled it will immedialy be re-created, thus existing reconciles loops will not be + // cancelled it will immediately be re-created, thus existing reconciles loops will not be // cancelled. // Whereas if passed through clusterInfo, we don't have that problem since clusterInfo is // re-hydrated when a context is cancelled. diff --git a/pkg/daemon/ceph/client/pool.go b/pkg/daemon/ceph/client/pool.go index f214afb14..e8ad144fd 100644 --- a/pkg/daemon/ceph/client/pool.go +++ b/pkg/daemon/ceph/client/pool.go @@ -214,20 +214,20 @@ func CreatePoolWithPGs(context *clusterd.Context, clusterInfo *ClusterInfo, clus func checkForImagesInPool(context *clusterd.Context, clusterInfo *ClusterInfo, name string) error { var err error - logger.Debugf("checking any images/snapshosts present in pool %q", name) + logger.Debugf("checking any images/snapshots present in pool %q", name) stats, err := GetPoolStatistics(context, clusterInfo, name) if err != nil { if strings.Contains(err.Error(), "No such file or directory") { return nil } - return errors.Wrapf(err, "failed to list images/snapshosts in pool %s", name) + return errors.Wrapf(err, "failed to list images/snapshots in pool %s", name) } if stats.Images.Count == 0 && stats.Images.SnapCount == 0 { - logger.Infof("no images/snapshosts present in pool %q", name) + logger.Infof("no images/snapshots present in pool %q", name) return nil } - return errors.Errorf("pool %q contains images/snapshosts", name) + return errors.Errorf("pool %q contains images/snapshots", name) } // DeletePool purges a pool from Ceph diff --git a/pkg/daemon/ceph/client/radosnamespace.go b/pkg/daemon/ceph/client/radosnamespace.go index 6f2689718..73fe28b80 100644 --- a/pkg/daemon/ceph/client/radosnamespace.go +++ b/pkg/daemon/ceph/client/radosnamespace.go @@ -70,17 +70,17 @@ func getRadosNamespaceStatistics(context *clusterd.Context, clusterInfo *Cluster } func checkForImagesInRadosNamespace(context *clusterd.Context, clusterInfo *ClusterInfo, poolName, namespaceName string) error { - logger.Debugf("checking any images/snapshosts present in pool %s/%s in k8s namespace %q", poolName, namespaceName, clusterInfo.Namespace) + logger.Debugf("checking any images/snapshots present in pool %s/%s in k8s namespace %q", poolName, namespaceName, clusterInfo.Namespace) stats, err := getRadosNamespaceStatistics(context, clusterInfo, poolName, namespaceName) if err != nil { - return errors.Wrapf(err, "failed to list images/snapshosts in pool %s/%s", poolName, namespaceName) + return errors.Wrapf(err, "failed to list images/snapshots in pool %s/%s", poolName, namespaceName) } if stats.Images.Count == 0 && stats.Images.SnapCount == 0 { - logger.Infof("no images/snapshosts present in pool %s/%s in k8s namespace %q", poolName, namespaceName, clusterInfo.Namespace) + logger.Infof("no images/snapshots present in pool %s/%s in k8s namespace %q", poolName, namespaceName, clusterInfo.Namespace) return nil } - return errors.Errorf("pool %s/%s contains %d images and %d snapshosts", poolName, namespaceName, stats.Images.Count, stats.Images.SnapCount) + return errors.Errorf("pool %s/%s contains %d images and %d snapshots", poolName, namespaceName, stats.Images.Count, stats.Images.SnapCount) } // DeleteRadosNamespace delete a rados namespace. diff --git a/pkg/daemon/ceph/client/upgrade.go b/pkg/daemon/ceph/client/upgrade.go index 4e8c67045..c14f16ea6 100644 --- a/pkg/daemon/ceph/client/upgrade.go +++ b/pkg/daemon/ceph/client/upgrade.go @@ -130,7 +130,7 @@ func OkToStop(context *clusterd.Context, clusterInfo *ClusterInfo, deployment, d // now trying to parse and find how many mons are presents // if we have less than 3 mons we skip the check and do best-effort // we do less than 3 because during the initial bootstrap the mon sequence is updated too - // so running running the check on 2/3 mon fails + // so running the check on 2/3 mon fails // versions.Mon looks like this map[ceph version 17.0.0-12-g6c8fb92 (6c8fb920cb1d862f36ee852ed849a15f9a50bd68) quincy (dev):1] // now looping over a single element since we can't address the key directly (we don't know its name) for _, monCount := range versions.Mon { diff --git a/pkg/daemon/ceph/osd/daemon.go b/pkg/daemon/ceph/osd/daemon.go index baca51b0d..94213ac21 100644 --- a/pkg/daemon/ceph/osd/daemon.go +++ b/pkg/daemon/ceph/osd/daemon.go @@ -257,7 +257,7 @@ func Provision(context *clusterd.Context, agent *OsdAgent, crushLocation, topolo volumeGroupName := getVolumeGroupName(deviceOSDs[0].BlockPath) // If empty the osd is using the ceph-volume raw mode - // so it's consumming a raw block device and LVM is not used + // so it's consuming a raw block device and LVM is not used // so there is nothing to de-activate if volumeGroupName != "" { if err := releaseLVMDevice(context, volumeGroupName); err != nil { diff --git a/pkg/daemon/ceph/osd/volume.go b/pkg/daemon/ceph/osd/volume.go index 71ffe1177..8384953c7 100644 --- a/pkg/daemon/ceph/osd/volume.go +++ b/pkg/daemon/ceph/osd/volume.go @@ -392,7 +392,7 @@ func UpdateLVMConfig(context *clusterd.Context, onPVC, lvBackedPV bool) error { // And reject everything else // We have 2 different regex depending on the version of LVM present in the container... // Since https://github.com/lvmteam/lvm2/commit/08396b4bce45fb8311979250623f04ec0ddb628c#diff-13c602a6258e57ce666a240e67c44f38 - // the content changed, so depending which version is installled one of the two replace will work + // the content changed, so depending which version is installed one of the two replace will work if lvBackedPV { // ceph-volume calls lvs to locate given "vg/lv", so allow "/dev" here. However, ignore loopback devices output = bytes.Replace(output, []byte(`# filter = [ "a|.*/|" ]`), []byte(`filter = [ "a|^/mnt/.*|", "r|^/dev/loop.*|", "a|^/dev/.*|", "r|.*|" ]`), 1) diff --git a/pkg/daemon/ceph/osd/volume_test.go b/pkg/daemon/ceph/osd/volume_test.go index 6bcc6a881..f934a5ade 100644 --- a/pkg/daemon/ceph/osd/volume_test.go +++ b/pkg/daemon/ceph/osd/volume_test.go @@ -1140,7 +1140,7 @@ func TestPrintCVLogContent(t *testing.T) { cvLogFilePath := path.Join(cvLogDir, "ceph-volume.log") assert.Equal(t, path.Join(cvLogDir, "ceph-volume.log"), cvLogFilePath) - // Print c-v log, it is empty so this is similating a failure (e,g: the file does not exist) + // Print c-v log, it is empty so this is simulating a failure (e,g: the file does not exist) cvLog := readCVLogContent(tmp.Name()) assert.Empty(t, cvLog, cvLog) diff --git a/pkg/operator/ceph/client/controller.go b/pkg/operator/ceph/client/controller.go index f3b45df67..d484d29e9 100644 --- a/pkg/operator/ceph/client/controller.go +++ b/pkg/operator/ceph/client/controller.go @@ -138,7 +138,7 @@ func (r *ReconcileCephClient) reconcile(request reconcile.Request) (reconcile.Re return reconcile.Result{}, *cephClient, errors.Wrap(err, "failed to get cephClient") } // update observedGeneration local variable with current generation value, - // because generation can be changed before reconile got completed + // because generation can be changed before reconcile got completed // CR status will be updated at end of reconcile, so to reflect the reconcile has finished observedGeneration := cephClient.ObjectMeta.Generation diff --git a/pkg/operator/ceph/cluster/cluster.go b/pkg/operator/ceph/cluster/cluster.go index 6593aa341..8cb4e26e5 100755 --- a/pkg/operator/ceph/cluster/cluster.go +++ b/pkg/operator/ceph/cluster/cluster.go @@ -179,7 +179,7 @@ func (c *ClusterController) initializeCluster(cluster *cluster) error { } } - // Depending on the cluster type choose the correct orchestation + // Depending on the cluster type choose the correct orchestration if cluster.Spec.External.Enable { err := c.configureExternalCephCluster(cluster) if err != nil { diff --git a/pkg/operator/ceph/cluster/cluster_external.go b/pkg/operator/ceph/cluster/cluster_external.go index 56fa7ce1f..87224556e 100644 --- a/pkg/operator/ceph/cluster/cluster_external.go +++ b/pkg/operator/ceph/cluster/cluster_external.go @@ -228,7 +228,7 @@ func (c *ClusterController) configureExternalClusterMonitoring(context *clusterd return errors.Wrap(err, "failed to configure external metrics endpoint") } - // Deploy external ServiceMonittor + // Deploy external ServiceMonitor logger.Info("creating external service monitor") // servicemonitor takes some metadata from the service for easy mapping err = manager.EnableServiceMonitor("") diff --git a/pkg/operator/ceph/cluster/mon/node_test.go b/pkg/operator/ceph/cluster/mon/node_test.go index 9647ffb5b..7a6db30b2 100644 --- a/pkg/operator/ceph/cluster/mon/node_test.go +++ b/pkg/operator/ceph/cluster/mon/node_test.go @@ -58,7 +58,7 @@ func TestNodeAffinity(t *testing.T) { }, } - // label nodes so they appear as not scheduable / invalid + // label nodes so they appear as not schedulable / invalid node, _ := clientset.CoreV1().Nodes().Get(ctx, "node0", metav1.GetOptions{}) node.Labels = map[string]string{"label": "foo"} _, err := clientset.CoreV1().Nodes().Update(ctx, node, metav1.UpdateOptions{}) diff --git a/pkg/operator/ceph/cluster/osd/status.go b/pkg/operator/ceph/cluster/osd/status.go index 3e0b3dc71..ac09c3c9a 100644 --- a/pkg/operator/ceph/cluster/osd/status.go +++ b/pkg/operator/ceph/cluster/osd/status.go @@ -162,7 +162,7 @@ func (c *Cluster) updateAndCreateOSDs( updateConfig *updateConfig, errs *provisionErrors, // add errors here ) error { - // tick every mintue to check-in on housekeeping stuff and report overall progress + // tick every minute to check-in on housekeeping stuff and report overall progress minuteTicker := time.NewTicker(minuteTickerDuration) defer minuteTicker.Stop() diff --git a/pkg/operator/ceph/cluster/rbd/config.go b/pkg/operator/ceph/cluster/rbd/config.go index 8aa302464..fe6678789 100644 --- a/pkg/operator/ceph/cluster/rbd/config.go +++ b/pkg/operator/ceph/cluster/rbd/config.go @@ -77,7 +77,7 @@ func fullDaemonName(daemonID string) string { return fmt.Sprintf("client.rbd-mirror.%s", daemonID) } -func (r *ReconcileCephRBDMirror) reconcileAddBoostrapPeer(cephRBDMirror *cephv1.CephRBDMirror, namespacedName types.NamespacedName) (reconcile.Result, error) { +func (r *ReconcileCephRBDMirror) reconcileAddBootstrapPeer(cephRBDMirror *cephv1.CephRBDMirror, namespacedName types.NamespacedName) (reconcile.Result, error) { // List all the peers secret, we can have more than one peer we might want to configure // For each, get the Kubernetes Secret and import the "peer token" so that we can configure the mirroring diff --git a/pkg/operator/ceph/cluster/rbd/controller.go b/pkg/operator/ceph/cluster/rbd/controller.go index 931d957fd..596dc6426 100644 --- a/pkg/operator/ceph/cluster/rbd/controller.go +++ b/pkg/operator/ceph/cluster/rbd/controller.go @@ -168,7 +168,7 @@ func (r *ReconcileCephRBDMirror) reconcile(request reconcile.Request) (reconcile r.updateStatus(k8sutil.ObservedGenerationNotAvailable, request.NamespacedName, k8sutil.EmptyStatus) } // update observedGeneration local variable with current generation value, - // because generation can be changed before reconile got completed + // because generation can be changed before reconcile got completed // CR status will be updated at end of reconcile, so to reflect the reconcile has finished observedGeneration := cephRBDMirror.ObjectMeta.Generation @@ -223,7 +223,7 @@ func (r *ReconcileCephRBDMirror) reconcile(request reconcile.Request) (reconcile // Add bootstrap peer if any logger.Debug("reconciling ceph rbd mirror peers addition") - reconcileResponse, err = r.reconcileAddBoostrapPeer(cephRBDMirror, request.NamespacedName) + reconcileResponse, err = r.reconcileAddBootstrapPeer(cephRBDMirror, request.NamespacedName) if err != nil { return opcontroller.ImmediateRetryResult, *cephRBDMirror, errors.Wrap(err, "failed to add ceph rbd mirror peer") } diff --git a/pkg/operator/ceph/cluster/telemetry/telemetry.go b/pkg/operator/ceph/cluster/telemetry/telemetry.go index 4528ddf34..7fc673f5f 100644 --- a/pkg/operator/ceph/cluster/telemetry/telemetry.go +++ b/pkg/operator/ceph/cluster/telemetry/telemetry.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package telemetry codifes the Rook telemetry spec used to record Rook information for Ceph +// Package telemetry codifies the Rook telemetry spec used to record Rook information for Ceph // telemetry. See: https://docs.ceph.com/en/latest/mgr/telemetry/ package telemetry diff --git a/pkg/operator/ceph/cluster/watcher.go b/pkg/operator/ceph/cluster/watcher.go index 391fb7388..abbb50a16 100644 --- a/pkg/operator/ceph/cluster/watcher.go +++ b/pkg/operator/ceph/cluster/watcher.go @@ -113,7 +113,7 @@ func (c *clientCluster) onK8sNode(ctx context.Context, object runtime.Object) bo logger.Debug(opcontroller.OperatorNotInitializedMessage) return false } - // If it fails, this might be due to the the operator just starting and catching an add event for that node + // If it fails, this might be due to the operator just starting and catching an add event for that node logger.Debugf("failed to get osds on node %q, assume reconcile is necessary", nodeName) return true } diff --git a/pkg/operator/ceph/controller/mirror_peer.go b/pkg/operator/ceph/controller/mirror_peer.go index 6ca260bf3..3f0ba5550 100644 --- a/pkg/operator/ceph/controller/mirror_peer.go +++ b/pkg/operator/ceph/controller/mirror_peer.go @@ -36,11 +36,11 @@ import ( const ( //nolint:gosec // since this is not leaking any hardcoded credentials, it's just the prefix of the secret name - poolMirrorBoostrapPeerSecretName = "pool-peer-token" + poolMirrorBootstrapPeerSecretName = "pool-peer-token" //nolint:gosec // since this is not leaking any hardcoded credentials, it's just the prefix of the secret name - fsMirrorBoostrapPeerSecretName = "fs-peer-token" + fsMirrorBootstrapPeerSecretName = "fs-peer-token" //nolint:gosec // // since this is not leaking any hardcoded credentials, it's just the prefix of the secret name - clusterMirrorBoostrapPeerSecretName = "cluster-peer-token" + clusterMirrorBootstrapPeerSecretName = "cluster-peer-token" //nolint:gosec // since this is not leaking any hardcoded credentials, it's just the prefix of the secret name RBDMirrorBootstrapPeerSecretName = "rbdMirrorBootstrapPeerSecretName" //nolint:gosec // since this is not leaking any hardcoded credentials, it's just the prefix of the secret name @@ -50,20 +50,20 @@ const ( func CreateBootstrapPeerSecret(ctx *clusterd.Context, clusterInfo *cephclient.ClusterInfo, object client.Object, ownerInfo *k8sutil.OwnerInfo) (reconcile.Result, error) { var err error var ns, name, daemonType string - var boostrapToken []byte + var bootstrapToken []byte switch objectType := object.(type) { case *cephv1.CephBlockPool: ns = objectType.Namespace name = objectType.Name daemonType = "rbd" // Create rbd mirror bootstrap peer token - boostrapToken, err = cephclient.CreateRBDMirrorBootstrapPeer(ctx, clusterInfo, name) + bootstrapToken, err = cephclient.CreateRBDMirrorBootstrapPeer(ctx, clusterInfo, name) if err != nil { return ImmediateRetryResult, errors.Wrapf(err, "failed to create %s-mirror bootstrap peer", daemonType) } // Add additional information to the peer token - boostrapToken, err = expandBootstrapPeerToken(ctx, clusterInfo, boostrapToken) + bootstrapToken, err = expandBootstrapPeerToken(ctx, clusterInfo, bootstrapToken) if err != nil { return ImmediateRetryResult, errors.Wrap(err, "failed to add extra information to rbd-mirror bootstrap peer") } @@ -72,13 +72,13 @@ func CreateBootstrapPeerSecret(ctx *clusterd.Context, clusterInfo *cephclient.Cl ns = objectType.Namespace daemonType = "cluster-rbd" // Create rbd mirror bootstrap peer token - boostrapToken, err = cephclient.CreateRBDMirrorBootstrapPeerWithoutPool(ctx, clusterInfo) + bootstrapToken, err = cephclient.CreateRBDMirrorBootstrapPeerWithoutPool(ctx, clusterInfo) if err != nil { return ImmediateRetryResult, errors.Wrapf(err, "failed to create %s-mirror bootstrap peer", daemonType) } // Add additional information to the peer token - boostrapToken, err = expandBootstrapPeerToken(ctx, clusterInfo, boostrapToken) + bootstrapToken, err = expandBootstrapPeerToken(ctx, clusterInfo, bootstrapToken) if err != nil { return ImmediateRetryResult, errors.Wrap(err, "failed to add extra information to rbd-mirror bootstrap peer") } @@ -87,7 +87,7 @@ func CreateBootstrapPeerSecret(ctx *clusterd.Context, clusterInfo *cephclient.Cl ns = objectType.Namespace name = objectType.Name daemonType = "cephfs" - boostrapToken, err = cephclient.CreateFSMirrorBootstrapPeer(ctx, clusterInfo, name) + bootstrapToken, err = cephclient.CreateFSMirrorBootstrapPeer(ctx, clusterInfo, name) if err != nil { return ImmediateRetryResult, errors.Wrapf(err, "failed to create %s-mirror bootstrap peer", daemonType) } @@ -97,7 +97,7 @@ func CreateBootstrapPeerSecret(ctx *clusterd.Context, clusterInfo *cephclient.Cl } // Generate and create a Kubernetes Secret with this token - s := GenerateBootstrapPeerSecret(object, boostrapToken) + s := GenerateBootstrapPeerSecret(object, bootstrapToken) // set ownerref to the Secret err = ownerInfo.SetControllerReference(s) @@ -136,7 +136,7 @@ func GenerateBootstrapPeerSecret(object client.Object, token []byte) *v1.Secret s := &v1.Secret{ ObjectMeta: metav1.ObjectMeta{ - Name: buildBoostrapPeerSecretName(object), + Name: buildBootstrapPeerSecretName(object), Namespace: entityNamespace, }, Data: map[string][]byte{ @@ -149,14 +149,14 @@ func GenerateBootstrapPeerSecret(object client.Object, token []byte) *v1.Secret return s } -func buildBoostrapPeerSecretName(object client.Object) string { +func buildBootstrapPeerSecretName(object client.Object) string { switch objectType := object.(type) { case *cephv1.CephFilesystem: - return fmt.Sprintf("%s-%s", fsMirrorBoostrapPeerSecretName, objectType.Name) + return fmt.Sprintf("%s-%s", fsMirrorBootstrapPeerSecretName, objectType.Name) case *cephv1.CephBlockPool: - return fmt.Sprintf("%s-%s", poolMirrorBoostrapPeerSecretName, objectType.Name) + return fmt.Sprintf("%s-%s", poolMirrorBootstrapPeerSecretName, objectType.Name) case *cephv1.CephCluster: - return fmt.Sprintf("%s-%s", clusterMirrorBoostrapPeerSecretName, objectType.Name) + return fmt.Sprintf("%s-%s", clusterMirrorBootstrapPeerSecretName, objectType.Name) } return "" @@ -167,9 +167,9 @@ func GenerateStatusInfo(object client.Object) map[string]string { switch object.(type) { case *cephv1.CephFilesystem: - m[FSMirrorBootstrapPeerSecretName] = buildBoostrapPeerSecretName(object) + m[FSMirrorBootstrapPeerSecretName] = buildBootstrapPeerSecretName(object) case *cephv1.CephBlockPool: - m[RBDMirrorBootstrapPeerSecretName] = buildBoostrapPeerSecretName(object) + m[RBDMirrorBootstrapPeerSecretName] = buildBootstrapPeerSecretName(object) } return m diff --git a/pkg/operator/ceph/controller/predicate.go b/pkg/operator/ceph/controller/predicate.go index cc6de2278..bbc3d62f7 100644 --- a/pkg/operator/ceph/controller/predicate.go +++ b/pkg/operator/ceph/controller/predicate.go @@ -48,7 +48,7 @@ const ( ) // WatchControllerPredicate is a special update filter for update events -// do not reconcile if the the status changes, this avoids a reconcile storm loop +// do not reconcile if the status changes, this avoids a reconcile storm loop // // returning 'true' means triggering a reconciliation // returning 'false' means do NOT trigger a reconciliation diff --git a/pkg/operator/ceph/csi/version_test.go b/pkg/operator/ceph/csi/version_test.go index 6ee5b8455..9b0ed3a1f 100644 --- a/pkg/operator/ceph/csi/version_test.go +++ b/pkg/operator/ceph/csi/version_test.go @@ -83,7 +83,7 @@ func Test_extractCephCSIVersion(t *testing.T) { assert.Equal(t, &expectedVersion, version) assert.Nil(t, err) - csiString = []byte(`Cephcsi Version: rubish + csiString = []byte(`Cephcsi Version: rubbish Git Commit: e58d537a07ca0184f67d33db85bf6b4911624b44 Go Version: go1.12.15 Compiler: gc diff --git a/pkg/operator/ceph/disruption/clusterdisruption/doc.go b/pkg/operator/ceph/disruption/clusterdisruption/doc.go index bd32ebbff..dceb8eeb4 100644 --- a/pkg/operator/ceph/disruption/clusterdisruption/doc.go +++ b/pkg/operator/ceph/disruption/clusterdisruption/doc.go @@ -15,7 +15,7 @@ limitations under the License. */ /* -Package clusterdisruption implements the controller for ensuring that drains occus in a safe manner. +Package clusterdisruption implements the controller for ensuring that drains occurs in a safe manner. The design and purpose for clusterdisruption management is found at: https://github.com/rook/rook/blob/master/design/ceph/ceph-managed-disruptionbudgets.md */ diff --git a/pkg/operator/ceph/disruption/clusterdisruption/osd_test.go b/pkg/operator/ceph/disruption/clusterdisruption/osd_test.go index f973ebf0b..661cfe07f 100644 --- a/pkg/operator/ceph/disruption/clusterdisruption/osd_test.go +++ b/pkg/operator/ceph/disruption/clusterdisruption/osd_test.go @@ -167,7 +167,7 @@ func TestGetOSDFailureDomains(t *testing.T) { expectedDrainingFailureDomains: []string{}, }, { - name: "case 2: osd in zone-1 is pending and node is unscheduable", + name: "case 2: osd in zone-1 is pending and node is unschedulable", osds: []appsv1.Deployment{fakeOSDDeployment(1, 0), fakeOSDDeployment(2, 1), fakeOSDDeployment(3, 1)}, osdPods: []corev1.Pod{fakeOSDPod(1, ""), fakeOSDPod(2, nodeName), @@ -178,7 +178,7 @@ func TestGetOSDFailureDomains(t *testing.T) { expectedDrainingFailureDomains: []string{"zone-1"}, }, { - name: "case 3: osd in zone-1 and zone-2 are pending and node is unscheduable", + name: "case 3: osd in zone-1 and zone-2 are pending and node is unschedulable", osds: []appsv1.Deployment{fakeOSDDeployment(1, 0), fakeOSDDeployment(2, 0), fakeOSDDeployment(3, 1)}, osdPods: []corev1.Pod{fakeOSDPod(1, ""), fakeOSDPod(2, ""), @@ -189,7 +189,7 @@ func TestGetOSDFailureDomains(t *testing.T) { expectedDrainingFailureDomains: []string{"zone-1", "zone-2"}, }, { - name: "case 4: osd in zone-1 is pending but osd node is scheduable", + name: "case 4: osd in zone-1 is pending but osd node is schedulable", osds: []appsv1.Deployment{fakeOSDDeployment(1, 0), fakeOSDDeployment(2, 1), fakeOSDDeployment(3, 1)}, osdPods: []corev1.Pod{fakeOSDPod(1, nodeName), fakeOSDPod(2, nodeName), @@ -200,7 +200,7 @@ func TestGetOSDFailureDomains(t *testing.T) { expectedDrainingFailureDomains: []string{}, }, { - name: "case 5: osd in zone-1 is pending but osd node is not scheduable", + name: "case 5: osd in zone-1 is pending but osd node is not schedulable", osds: []appsv1.Deployment{fakeOSDDeployment(1, 0), fakeOSDDeployment(2, 1), fakeOSDDeployment(3, 1)}, osdPods: []corev1.Pod{fakeOSDPod(1, nodeName), fakeOSDPod(2, nodeName), diff --git a/pkg/operator/ceph/disruption/clusterdisruption/reconcile.go b/pkg/operator/ceph/disruption/clusterdisruption/reconcile.go index bda740810..9c81f4771 100644 --- a/pkg/operator/ceph/disruption/clusterdisruption/reconcile.go +++ b/pkg/operator/ceph/disruption/clusterdisruption/reconcile.go @@ -232,7 +232,7 @@ func (c *ClusterMap) GetCluster(namespace string) (*cephv1.CephCluster, bool) { return cluster, true } -// GetClusterNamespaces returns the internal clustermap for iteration purporses +// GetClusterNamespaces returns the internal clustermap for iteration purposes func (c *ClusterMap) GetClusterNamespaces() []string { defer c.mux.Unlock() c.mux.Lock() diff --git a/pkg/operator/ceph/file/controller.go b/pkg/operator/ceph/file/controller.go index 21e2a1b34..e362ff68c 100644 --- a/pkg/operator/ceph/file/controller.go +++ b/pkg/operator/ceph/file/controller.go @@ -184,7 +184,7 @@ func (r *ReconcileCephFilesystem) reconcile(request reconcile.Request) (reconcil } // update observedGeneration local variable with current generation value, - // because generation can be changed before reconile got completed + // because generation can be changed before reconcile got completed // CR status will be updated at end of reconcile, so to reflect the reconcile has finished observedGeneration := cephFilesystem.ObjectMeta.Generation @@ -360,7 +360,7 @@ func (r *ReconcileCephFilesystem) reconcile(request reconcile.Request) (reconcil } logger.Info("reconciling add cephfs-mirror peer configuration") - err = r.reconcileAddBoostrapPeer(cephFilesystem, request.NamespacedName) + err = r.reconcileAddBootstrapPeer(cephFilesystem, request.NamespacedName) if err != nil { return opcontroller.ImmediateRetryResult, *cephFilesystem, errors.Wrapf(err, "failed to configure mirroring for filesystem %q.", cephFilesystem.Name) @@ -473,7 +473,7 @@ func (r *ReconcileCephFilesystem) reconcileMirroring(cephFilesystem *cephv1.Ceph return nil } -func (r *ReconcileCephFilesystem) reconcileAddBoostrapPeer(cephFilesystem *cephv1.CephFilesystem, namespacedName types.NamespacedName) error { +func (r *ReconcileCephFilesystem) reconcileAddBootstrapPeer(cephFilesystem *cephv1.CephFilesystem, namespacedName types.NamespacedName) error { if cephFilesystem.Spec.Mirroring.Peers == nil { return nil } diff --git a/pkg/operator/ceph/file/filesystem.go b/pkg/operator/ceph/file/filesystem.go index afdec373e..5d3f88087 100644 --- a/pkg/operator/ceph/file/filesystem.go +++ b/pkg/operator/ceph/file/filesystem.go @@ -261,7 +261,7 @@ func (f *Filesystem) doFilesystemCreate(context *clusterd.Context, clusterInfo * } } - // create the filesystem ('fs new' needs to be forced in order to reuse pre-existing pools) + // create the filesystem ('fs new' needs to be forced in order to reuse preexisting pools) // if only one pool is created new it won't work (to avoid inconsistencies). if err := cephclient.CreateFilesystem(context, clusterInfo, f.Name, metadataPool.Name, dataPoolNames); err != nil { return err diff --git a/pkg/operator/ceph/file/mirror/controller.go b/pkg/operator/ceph/file/mirror/controller.go index 0f9028cc0..90c25c8a1 100644 --- a/pkg/operator/ceph/file/mirror/controller.go +++ b/pkg/operator/ceph/file/mirror/controller.go @@ -155,7 +155,7 @@ func (r *ReconcileFilesystemMirror) reconcile(request reconcile.Request) (reconc } // update observedGeneration local variable with current generation value, - // because generation can be changed before reconile got completed + // because generation can be changed before reconcile got completed // CR status will be updated at end of reconcile, so to reflect the reconcile has finished observedGeneration := filesystemMirror.ObjectMeta.Generation diff --git a/pkg/operator/ceph/nfs/controller.go b/pkg/operator/ceph/nfs/controller.go index f9af18ba1..7d460ed1e 100644 --- a/pkg/operator/ceph/nfs/controller.go +++ b/pkg/operator/ceph/nfs/controller.go @@ -155,7 +155,7 @@ func (r *ReconcileCephNFS) reconcile(request reconcile.Request) (reconcile.Resul return reconcile.Result{}, *cephNFS, errors.Wrap(err, "failed to get cephNFS") } // update observedGeneration local variable with current generation value, - // because generation can be changed before reconile got completed + // because generation can be changed before reconcile got completed // CR status will be updated at end of reconcile, so to reflect the reconcile has finished observedGeneration := cephNFS.ObjectMeta.Generation diff --git a/pkg/operator/ceph/object/controller.go b/pkg/operator/ceph/object/controller.go index 7b6ea3ada..9de9bef39 100644 --- a/pkg/operator/ceph/object/controller.go +++ b/pkg/operator/ceph/object/controller.go @@ -178,7 +178,7 @@ func (r *ReconcileCephObjectStore) reconcile(request reconcile.Request) (reconci return reconcile.Result{}, *cephObjectStore, errors.Wrap(err, "failed to get cephObjectStore") } // update observedGeneration local variable with current generation value, - // because generation can be changed before reconile got completed + // because generation can be changed before reconcile got completed // CR status will be updated at end of reconcile, so to reflect the reconcile has finished observedGeneration := cephObjectStore.ObjectMeta.Generation diff --git a/pkg/operator/ceph/object/health.go b/pkg/operator/ceph/object/health.go index f27a373e4..fe2ca1760 100644 --- a/pkg/operator/ceph/object/health.go +++ b/pkg/operator/ceph/object/health.go @@ -187,7 +187,7 @@ func (c *bucketChecker) checkObjectStoreHealth() error { logger.Debugf("successfully checked object store endpoint for object store %q", c.namespacedName.String()) - // Update the EndpointStatus in the CR to reflect the healthyness + // Update the EndpointStatus in the CR to reflect the healthiness updateStatusBucket(c.objContext.clusterInfo.Context, c.client, c.namespacedName, cephv1.ConditionConnected, "") return nil diff --git a/pkg/operator/ceph/object/objectstore.go b/pkg/operator/ceph/object/objectstore.go index a5b880c42..c2921ca48 100644 --- a/pkg/operator/ceph/object/objectstore.go +++ b/pkg/operator/ceph/object/objectstore.go @@ -479,7 +479,7 @@ func joinMultisite(objContext *Context, endpointArg, zoneEndpoints, namespace st logger.Infof("added object store %q to realm %q, zonegroup %q, zone %q", objContext.Name, objContext.Realm, objContext.ZoneGroup, objContext.Zone) - // create system user for realm for master zone in master zonegorup for multisite scenario + // create system user for realm for master zone in master zonegroup for multisite scenario if zoneIsMaster && zoneGroupIsMaster { err = createSystemUser(objContext, namespace) if err != nil { diff --git a/pkg/operator/ceph/object/policy.go b/pkg/operator/ceph/object/policy.go index 647b1933f..f1105928f 100644 --- a/pkg/operator/ceph/object/policy.go +++ b/pkg/operator/ceph/object/policy.go @@ -120,7 +120,7 @@ const ( effectDeny effect = "Deny" ) -// PolicyStatment is the Go representation of a PolicyStatement json struct +// PolicyStatement is the Go representation of a PolicyStatement json struct // it defines what Actions that a Principle can or cannot perform on a Resource type PolicyStatement struct { // Sid (optional) is the PolicyStatement's unique identifier @@ -234,7 +234,7 @@ func (bp *BucketPolicy) EjectPrincipals(users ...string) *BucketPolicy { return bp } -// NewPolicyStatement generates a new PolicyStatement. PolicyStatment methods are designed to +// NewPolicyStatement generates a new PolicyStatement. PolicyStatement methods are designed to // be chain called with dot notation to allow for easy configuration at creation. This is preferable // to a long parameter list. func NewPolicyStatement() *PolicyStatement { diff --git a/pkg/operator/ceph/object/realm/controller.go b/pkg/operator/ceph/object/realm/controller.go index 9785f2a3c..0e93c0245 100644 --- a/pkg/operator/ceph/object/realm/controller.go +++ b/pkg/operator/ceph/object/realm/controller.go @@ -138,7 +138,7 @@ func (r *ReconcileObjectRealm) reconcile(request reconcile.Request) (reconcile.R return reconcile.Result{}, *cephObjectRealm, errors.Wrap(err, "failed to get CephObjectRealm") } // update observedGeneration local variable with current generation value, - // because generation can be changed before reconile got completed + // because generation can be changed before reconcile got completed // CR status will be updated at end of reconcile, so to reflect the reconcile has finished observedGeneration := cephObjectRealm.ObjectMeta.Generation diff --git a/pkg/operator/ceph/object/rgw_test.go b/pkg/operator/ceph/object/rgw_test.go index e90092382..e04703716 100644 --- a/pkg/operator/ceph/object/rgw_test.go +++ b/pkg/operator/ceph/object/rgw_test.go @@ -182,17 +182,17 @@ func TestGetTlsCaCert(t *testing.T) { objectStore := simpleStore() t.Run("no gateway cert ref", func(t *testing.T) { - tlsCert, insesure, err := GetTlsCaCert(objContext, &objectStore.Spec) + tlsCert, insecure, err := GetTlsCaCert(objContext, &objectStore.Spec) assert.NoError(t, err) - assert.False(t, insesure) + assert.False(t, insecure) assert.Nil(t, tlsCert) }) t.Run("gateway cert ref but secret no found", func(t *testing.T) { objectStore.Spec.Gateway.SSLCertificateRef = "my-secret" - tlsCert, insesure, err := GetTlsCaCert(objContext, &objectStore.Spec) + tlsCert, insecure, err := GetTlsCaCert(objContext, &objectStore.Spec) assert.Error(t, err) - assert.False(t, insesure) + assert.False(t, insecure) assert.Nil(t, tlsCert) }) @@ -207,10 +207,10 @@ func TestGetTlsCaCert(t *testing.T) { _, err := objContext.Context.Clientset.CoreV1().Secrets(objContext.clusterInfo.Namespace).Create(context.TODO(), s, metav1.CreateOptions{}) assert.NoError(t, err) objectStore.Spec.Gateway.SSLCertificateRef = "my-secret" - tlsCert, insesure, err := GetTlsCaCert(objContext, &objectStore.Spec) + tlsCert, insecure, err := GetTlsCaCert(objContext, &objectStore.Spec) assert.Error(t, err) assert.EqualError(t, err, "failed to get TLS certificate from secret, unknown secret type \"Yolo\"") - assert.False(t, insesure) + assert.False(t, insecure) assert.Nil(t, tlsCert) err = objContext.Context.Clientset.CoreV1().Secrets(objContext.clusterInfo.Namespace).Delete(context.TODO(), s.Name, metav1.DeleteOptions{}) assert.NoError(t, err) @@ -227,10 +227,10 @@ func TestGetTlsCaCert(t *testing.T) { _, err := objContext.Context.Clientset.CoreV1().Secrets(objContext.clusterInfo.Namespace).Create(context.TODO(), s, metav1.CreateOptions{}) assert.NoError(t, err) objectStore.Spec.Gateway.SSLCertificateRef = "my-secret" - tlsCert, insesure, err := GetTlsCaCert(objContext, &objectStore.Spec) + tlsCert, insecure, err := GetTlsCaCert(objContext, &objectStore.Spec) assert.Error(t, err) assert.EqualError(t, err, "failed to get TLS certificate from secret, token is \"Opaque\" but key \"cert\" does not exist") - assert.False(t, insesure) + assert.False(t, insecure) assert.Nil(t, tlsCert) err = objContext.Context.Clientset.CoreV1().Secrets(objContext.clusterInfo.Namespace).Delete(context.TODO(), s.Name, metav1.DeleteOptions{}) assert.NoError(t, err) @@ -256,9 +256,9 @@ BvjQDN6didwQ _, err := objContext.Context.Clientset.CoreV1().Secrets(objContext.clusterInfo.Namespace).Create(context.TODO(), s, metav1.CreateOptions{}) assert.NoError(t, err) objectStore.Spec.Gateway.SSLCertificateRef = "my-secret" - tlsCert, insesure, err := GetTlsCaCert(objContext, &objectStore.Spec) + tlsCert, insecure, err := GetTlsCaCert(objContext, &objectStore.Spec) assert.NoError(t, err) - assert.False(t, insesure) + assert.False(t, insecure) assert.NotNil(t, tlsCert) err = objContext.Context.Clientset.CoreV1().Secrets(objContext.clusterInfo.Namespace).Delete(context.TODO(), s.Name, metav1.DeleteOptions{}) assert.NoError(t, err) diff --git a/pkg/operator/ceph/object/s3-handlers_test.go b/pkg/operator/ceph/object/s3-handlers_test.go index 4b0865673..308575397 100644 --- a/pkg/operator/ceph/object/s3-handlers_test.go +++ b/pkg/operator/ceph/object/s3-handlers_test.go @@ -66,7 +66,7 @@ func TestNewS3Agent(t *testing.T) { assert.NotNil(t, s3Agent.Client.Config.HTTPClient.Transport.(*http.Transport).TLSClientConfig.RootCAs) assert.False(t, *s3Agent.Client.Config.DisableSSL) }) - t.Run("test with insesure tls client cert", func(t *testing.T) { + t.Run("test with insecure tls client cert", func(t *testing.T) { debug := true insecure := true tlsCert := []byte("tlsCert") diff --git a/pkg/operator/ceph/object/topic/controller.go b/pkg/operator/ceph/object/topic/controller.go index 608cc17e5..8b6221b3a 100644 --- a/pkg/operator/ceph/object/topic/controller.go +++ b/pkg/operator/ceph/object/topic/controller.go @@ -108,7 +108,7 @@ func (r *ReconcileBucketTopic) reconcile(request reconcile.Request) (reconcile.R return reconcile.Result{}, errors.Wrapf(err, "failed to get CephBucketTopic %q", request.NamespacedName) } // update observedGeneration local variable with current generation value, - // because generation can be changed before reconile got completed + // because generation can be changed before reconcile got completed // CR status will be updated at end of reconcile, so to reflect the reconcile has finished observedGeneration := cephBucketTopic.ObjectMeta.Generation diff --git a/pkg/operator/ceph/object/user/controller.go b/pkg/operator/ceph/object/user/controller.go index 5410f210c..a57a15f50 100644 --- a/pkg/operator/ceph/object/user/controller.go +++ b/pkg/operator/ceph/object/user/controller.go @@ -148,7 +148,7 @@ func (r *ReconcileObjectStoreUser) reconcile(request reconcile.Request) (reconci return reconcile.Result{}, *cephObjectStoreUser, errors.Wrap(err, "failed to get CephObjectStoreUser") } // update observedGeneration local variable with current generation value, - // because generation can be changed before reconile got completed + // because generation can be changed before reconcile got completed // CR status will be updated at end of reconcile, so to reflect the reconcile has finished observedGeneration := cephObjectStoreUser.ObjectMeta.Generation @@ -268,7 +268,7 @@ func (r *ReconcileObjectStoreUser) reconcile(request reconcile.Request) (reconci } func (r *ReconcileObjectStoreUser) reconcileCephUser(cephObjectStoreUser *cephv1.CephObjectStoreUser) (reconcile.Result, error) { - err := r.createorUpdateCephUser(cephObjectStoreUser) + err := r.createOrUpdateCephUser(cephObjectStoreUser) if err != nil { return reconcile.Result{}, errors.Wrapf(err, "failed to create/update object store user %q", cephObjectStoreUser.Name) } @@ -276,7 +276,7 @@ func (r *ReconcileObjectStoreUser) reconcileCephUser(cephObjectStoreUser *cephv1 return reconcile.Result{}, nil } -func (r *ReconcileObjectStoreUser) createorUpdateCephUser(u *cephv1.CephObjectStoreUser) error { +func (r *ReconcileObjectStoreUser) createOrUpdateCephUser(u *cephv1.CephObjectStoreUser) error { logger.Infof("creating ceph object user %q in namespace %q", u.Name, u.Namespace) logCreateOrUpdate := fmt.Sprintf("retrieved existing ceph object user %q", u.Name) diff --git a/pkg/operator/ceph/object/user/controller_test.go b/pkg/operator/ceph/object/user/controller_test.go index 0bd43e350..6307cf749 100644 --- a/pkg/operator/ceph/object/user/controller_test.go +++ b/pkg/operator/ceph/object/user/controller_test.go @@ -340,7 +340,7 @@ func TestBuildUpdateStatusInfo(t *testing.T) { assert.Equal(t, "rook-ceph-object-user-my-store-my-user", statusInfo["secretName"]) } -func TestCreateorUpdateCephUser(t *testing.T) { +func TestCreateOrUpdateCephUser(t *testing.T) { // Set DEBUG logging capnslog.SetGlobalLogLevel(capnslog.DEBUG) @@ -425,7 +425,7 @@ func TestCreateorUpdateCephUser(t *testing.T) { assert.NoError(t, err) t.Run("user with empty name", func(t *testing.T) { - err = r.createorUpdateCephUser(objectUser) + err = r.createOrUpdateCephUser(objectUser) assert.Error(t, err) }) @@ -433,7 +433,7 @@ func TestCreateorUpdateCephUser(t *testing.T) { objectUser.Name = name userConfig = generateUserConfig(objectUser) r.userConfig = &userConfig - err = r.createorUpdateCephUser(objectUser) + err = r.createOrUpdateCephUser(objectUser) assert.NoError(t, err) }) @@ -441,7 +441,7 @@ func TestCreateorUpdateCephUser(t *testing.T) { objectUser.Spec.Quotas = &cephv1.ObjectUserQuotaSpec{MaxBuckets: &maxbucket} userConfig = generateUserConfig(objectUser) r.userConfig = &userConfig - err = r.createorUpdateCephUser(objectUser) + err = r.createOrUpdateCephUser(objectUser) assert.NoError(t, err) }) @@ -453,7 +453,7 @@ func TestCreateorUpdateCephUser(t *testing.T) { } userConfig = generateUserConfig(objectUser) r.userConfig = &userConfig - err = r.createorUpdateCephUser(objectUser) + err = r.createOrUpdateCephUser(objectUser) assert.NoError(t, err) }) @@ -463,35 +463,35 @@ func TestCreateorUpdateCephUser(t *testing.T) { objectUser.Spec.Quotas = &cephv1.ObjectUserQuotaSpec{MaxObjects: &maxobject} userConfig = generateUserConfig(objectUser) r.userConfig = &userConfig - err = r.createorUpdateCephUser(objectUser) + err = r.createOrUpdateCephUser(objectUser) assert.NoError(t, err) }) t.Run("setting MaxSize for the user", func(t *testing.T) { objectUser.Spec.Quotas = &cephv1.ObjectUserQuotaSpec{MaxSize: &maxsize} userConfig = generateUserConfig(objectUser) r.userConfig = &userConfig - err = r.createorUpdateCephUser(objectUser) + err = r.createOrUpdateCephUser(objectUser) assert.NoError(t, err) }) t.Run("resetting MaxSize and MaxObjects for the user", func(t *testing.T) { objectUser.Spec.Quotas = nil userConfig = generateUserConfig(objectUser) r.userConfig = &userConfig - err = r.createorUpdateCephUser(objectUser) + err = r.createOrUpdateCephUser(objectUser) assert.NoError(t, err) }) t.Run("setting both MaxSize and MaxObjects for the user", func(t *testing.T) { objectUser.Spec.Quotas = &cephv1.ObjectUserQuotaSpec{MaxObjects: &maxobject, MaxSize: &maxsize} userConfig = generateUserConfig(objectUser) r.userConfig = &userConfig - err = r.createorUpdateCephUser(objectUser) + err = r.createOrUpdateCephUser(objectUser) assert.NoError(t, err) }) t.Run("resetting MaxSize and MaxObjects again for the user", func(t *testing.T) { objectUser.Spec.Quotas = nil userConfig = generateUserConfig(objectUser) r.userConfig = &userConfig - err = r.createorUpdateCephUser(objectUser) + err = r.createOrUpdateCephUser(objectUser) assert.NoError(t, err) }) @@ -503,7 +503,7 @@ func TestCreateorUpdateCephUser(t *testing.T) { objectUser.Spec.Quotas = &cephv1.ObjectUserQuotaSpec{MaxBuckets: &maxbucket, MaxObjects: &maxobject, MaxSize: &maxsize} userConfig = generateUserConfig(objectUser) r.userConfig = &userConfig - err = r.createorUpdateCephUser(objectUser) + err = r.createOrUpdateCephUser(objectUser) assert.NoError(t, err) }) } diff --git a/pkg/operator/ceph/object/zone/controller.go b/pkg/operator/ceph/object/zone/controller.go index 90d163636..c5e8fda7f 100644 --- a/pkg/operator/ceph/object/zone/controller.go +++ b/pkg/operator/ceph/object/zone/controller.go @@ -135,7 +135,7 @@ func (r *ReconcileObjectZone) reconcile(request reconcile.Request) (reconcile.Re return reconcile.Result{}, *cephObjectZone, errors.Wrap(err, "failed to get CephObjectZone") } // update observedGeneration local variable with current generation value, - // because generation can be changed before reconile got completed + // because generation can be changed before reconcile got completed // CR status will be updated at end of reconcile, so to reflect the reconcile has finished observedGeneration := cephObjectZone.ObjectMeta.Generation diff --git a/pkg/operator/ceph/object/zonegroup/controller.go b/pkg/operator/ceph/object/zonegroup/controller.go index e31848145..088c3ec79 100644 --- a/pkg/operator/ceph/object/zonegroup/controller.go +++ b/pkg/operator/ceph/object/zonegroup/controller.go @@ -132,7 +132,7 @@ func (r *ReconcileObjectZoneGroup) reconcile(request reconcile.Request) (reconci return reconcile.Result{}, errors.Wrap(err, "failed to get CephObjectZoneGroup") } // update observedGeneration local variable with current generation value, - // because generation can be changed before reconile got completed + // because generation can be changed before reconcile got completed // CR status will be updated at end of reconcile, so to reflect the reconcile has finished observedGeneration := cephObjectZoneGroup.ObjectMeta.Generation diff --git a/pkg/operator/ceph/pool/controller.go b/pkg/operator/ceph/pool/controller.go index 432f52143..a77368185 100644 --- a/pkg/operator/ceph/pool/controller.go +++ b/pkg/operator/ceph/pool/controller.go @@ -161,7 +161,7 @@ func (r *ReconcileCephBlockPool) reconcile(request reconcile.Request) (reconcile return opcontroller.ImmediateRetryResult, *cephBlockPool, errors.Wrap(err, "failed to get CephBlockPool") } // update observedGeneration local variable with current generation value, - // because generation can be changed before reconile got completed + // because generation can be changed before reconcile got completed // CR status will be updated at end of reconcile, so to reflect the reconcile has finished observedGeneration := cephBlockPool.ObjectMeta.Generation @@ -322,7 +322,7 @@ func (r *ReconcileCephBlockPool) reconcile(request reconcile.Request) (reconcile // Add bootstrap peer if any logger.Debug("reconciling ceph bootstrap peers import") - reconcileResponse, err = r.reconcileAddBoostrapPeer(cephBlockPool, request.NamespacedName) + reconcileResponse, err = r.reconcileAddBootstrapPeer(cephBlockPool, request.NamespacedName) if err != nil { return reconcileResponse, *cephBlockPool, errors.Wrap(err, "failed to add ceph rbd mirror peer") } diff --git a/pkg/operator/ceph/pool/peers.go b/pkg/operator/ceph/pool/peers.go index ceadbb2d3..630ad07e3 100644 --- a/pkg/operator/ceph/pool/peers.go +++ b/pkg/operator/ceph/pool/peers.go @@ -26,7 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" ) -func (r *ReconcileCephBlockPool) reconcileAddBoostrapPeer(pool *cephv1.CephBlockPool, +func (r *ReconcileCephBlockPool) reconcileAddBootstrapPeer(pool *cephv1.CephBlockPool, namespacedName types.NamespacedName) (reconcile.Result, error) { if pool.Spec.Mirroring.Peers == nil { diff --git a/pkg/operator/ceph/test/spec.go b/pkg/operator/ceph/test/spec.go index 417c25afc..0c69dbf59 100644 --- a/pkg/operator/ceph/test/spec.go +++ b/pkg/operator/ceph/test/spec.go @@ -70,7 +70,7 @@ func VerifyPodLabels(appName, namespace, daemonType, daemonID string, labels map return combineErrors(errA, errB, errC) } -// AssertLabelsContainCephRequirements asserts that the the labels under test contain the labels +// AssertLabelsContainCephRequirements asserts that the labels under test contain the labels // which all Ceph pods should have. This can be used with labels for Kubernetes Deployments, // DaemonSets, etc. func AssertLabelsContainCephRequirements( diff --git a/pkg/operator/ceph/webhook-config.go b/pkg/operator/ceph/webhook-config.go index f42a6c7c4..855428d38 100644 --- a/pkg/operator/ceph/webhook-config.go +++ b/pkg/operator/ceph/webhook-config.go @@ -255,7 +255,7 @@ func webhookRules(name, resource, resourceServicePath string) admv1.ValidatingWe } } -func deleteIssuerAndCetificate(ctx context.Context, certMgrClient *cs.CertmanagerV1Client, clusterdContext *clusterd.Context) error { +func deleteIssuerAndCertificate(ctx context.Context, certMgrClient *cs.CertmanagerV1Client, clusterdContext *clusterd.Context) error { err := clusterdContext.Clientset.AdmissionregistrationV1().ValidatingWebhookConfigurations().Delete(ctx, webhookConfigName, metav1.DeleteOptions{}) if err != nil && !kerrors.IsNotFound(err) { diff --git a/pkg/operator/ceph/webhook.go b/pkg/operator/ceph/webhook.go index e4f611888..3baaccb43 100644 --- a/pkg/operator/ceph/webhook.go +++ b/pkg/operator/ceph/webhook.go @@ -53,7 +53,7 @@ func createWebhook(ctx context.Context, context *clusterd.Context) (bool, error) if os.Getenv(webhookEnv) == "true" { logger.Info("delete Issuer and Certificate since secret is not found") - if err = deleteIssuerAndCetificate(ctx, certMgrClient, context); err != nil { + if err = deleteIssuerAndCertificate(ctx, certMgrClient, context); err != nil { logger.Errorf("failed to delete issuer or certificate. %v", err) } return false, nil @@ -84,7 +84,7 @@ func createWebhook(ctx context.Context, context *clusterd.Context) (bool, error) if apierrors.IsNotFound(err) { // If secret is not found. All good ! Proceed with rook without admission controllers logger.Info("delete Issuer and Certificate since secret is not found") - if err = deleteIssuerAndCetificate(ctx, certMgrClient, context); err != nil { + if err = deleteIssuerAndCertificate(ctx, certMgrClient, context); err != nil { logger.Infof("could not delete issuer or certificate. %v", err) } logger.Infof("admission webhook secret %q not found. proceeding without the admission controller", admissionControllerAppName) diff --git a/pkg/operator/k8sutil/options.go b/pkg/operator/k8sutil/options.go index 2d68994be..8bc014a2d 100644 --- a/pkg/operator/k8sutil/options.go +++ b/pkg/operator/k8sutil/options.go @@ -39,7 +39,7 @@ type WaitOptions struct { // ErrorOnTimeout defines whether the operation should time out with an error. If ErrorOnTimeout // is true and the operation times out, the operation is considered a failure. If ErrorOnTimeout - // is false and the operation times out, the operation should log a warning but not not report + // is false and the operation times out, the operation should log a warning but not report // failure. ErrorOnTimeout bool } diff --git a/pkg/operator/test/spec.go b/pkg/operator/test/spec.go index 956e19c4b..896f80853 100644 --- a/pkg/operator/test/spec.go +++ b/pkg/operator/test/spec.go @@ -71,7 +71,7 @@ func ArgumentsMatchExpected(actualArgs []string, expectedArgs [][]string) error return nil } -// AssertLabelsContainRookRequirements asserts that the the labels under test contain the labels +// AssertLabelsContainRookRequirements asserts that the labels under test contain the labels // which all Rook pods should have. This can be used with labels for Kubernetes Deployments, // DaemonSets, etc. func AssertLabelsContainRookRequirements(t *testing.T, labels map[string]string, appName string) { diff --git a/pkg/operator/test/volumes.go b/pkg/operator/test/volumes.go index e7fc7b2b6..46aabb73a 100644 --- a/pkg/operator/test/volumes.go +++ b/pkg/operator/test/volumes.go @@ -62,7 +62,7 @@ func VolumeIsHostPath(volumeName, path string, volumes []v1.Volume) error { return err } -// VolumeMountExists returns returns a descriptive error if the volume mount does not exist. +// VolumeMountExists returns a descriptive error if the volume mount does not exist. func VolumeMountExists(mountName string, mounts []v1.VolumeMount) error { _, err := getMount(mountName, mounts) return err diff --git a/tests/framework/clients/block.go b/tests/framework/clients/block.go index f00b57fd0..f07939832 100644 --- a/tests/framework/clients/block.go +++ b/tests/framework/clients/block.go @@ -124,7 +124,7 @@ func (b *BlockOperation) DeleteStorageClass(storageClassName string) error { // BlockDelete Function to delete a Block using Rook // Input parameters - -// manifest - pod definition where pvc is described - delete is run on the the yaml definition +// manifest - pod definition where pvc is described - delete is run on the yaml definition // Output - k8s delete pvc operation output and/or error func (b *BlockOperation) DeleteBlock(manifest string) (string, error) { args := []string{"delete", "-f", "-"} diff --git a/tests/framework/clients/object_user.go b/tests/framework/clients/object_user.go index 667a8bef5..1fb87d26b 100644 --- a/tests/framework/clients/object_user.go +++ b/tests/framework/clients/object_user.go @@ -64,7 +64,7 @@ func (o *ObjectUserOperation) UserSecretExists(namespace string, store string, u //GetResource(blah) returns success if blah is or is not found. //err = success and found_sec not "No resources found." means it was found //err = success and found_sec contains "No resources found." means it was not found - //err != success is an other error + //err != success is another error if err == nil && !strings.Contains(message, "No resources found") { logger.Infof("Object User Secret Exists") return true diff --git a/tests/framework/installer/ceph_helm_installer.go b/tests/framework/installer/ceph_helm_installer.go index 2c2fad488..87627bb58 100644 --- a/tests/framework/installer/ceph_helm_installer.go +++ b/tests/framework/installer/ceph_helm_installer.go @@ -122,8 +122,8 @@ func (h *CephInstaller) configureRookCephClusterViaHelm(upgrade bool) error { "resources": nil, } values["monitoring"] = map[string]interface{}{ - "enabled": true, - "createPromtheusRules": true, + "enabled": true, + "createPrometheusRules": true, } values["ingress"] = map[string]interface{}{ "dashboard": map[string]interface{}{ diff --git a/tests/framework/utils/exec_utils.go b/tests/framework/utils/exec_utils.go index adc2d4b6b..1835f54d3 100644 --- a/tests/framework/utils/exec_utils.go +++ b/tests/framework/utils/exec_utils.go @@ -29,7 +29,7 @@ import ( var logger = capnslog.NewPackageLogger("github.com/rook/rook", "testutil") -// CommandArgs is a warpper for cmd args +// CommandArgs is a wrapper for cmd args type CommandArgs struct { Command string CmdArgs []string diff --git a/tests/scripts/auto-grow-storage.sh b/tests/scripts/auto-grow-storage.sh index 51c10e232..8871af059 100755 --- a/tests/scripts/auto-grow-storage.sh +++ b/tests/scripts/auto-grow-storage.sh @@ -180,7 +180,7 @@ function creatingPrerequisites(){ echo "creating Prerequisites deployments - Prometheus Operator and Prometheus Instances" # creating Prometheus operator kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/v0.40.0/bundle.yaml - # waitng for Prometheus operator to get ready + # waiting for Prometheus operator to get ready timeout 30 sh -c "until [ $(kubectl get pod -l app.kubernetes.'io/name'=prometheus-operator -o json | jq -r '.items[0].status.phase') = Running ]; do echo 'waiting for prometheus-operator to get created' && sleep 1; done" # creating a service monitor that will watch the Rook cluster and collect metrics regularly kubectl create -f https://raw.githubusercontent.com/rook/rook/master/deploy/examples/monitoring/service-monitor.yaml @@ -190,7 +190,7 @@ function creatingPrerequisites(){ kubectl create -f https://raw.githubusercontent.com/rook/rook/master/deploy/examples/monitoring/prometheus.yaml # create prometheus-service kubectl create -f https://raw.githubusercontent.com/rook/rook/master/deploy/examples/monitoring/prometheus-service.yaml - # waitng for prometheus-rook-prometheus-0 pod to get ready + # waiting for prometheus-rook-prometheus-0 pod to get ready timeout 60 sh -c "until [ $(kubectl get pod -l prometheus=rook-prometheus -nrook-ceph -o json | jq -r '.items[0].status.phase') = Running ]; do echo 'waiting for prometheus-rook-prometheus-0 pod to get created' && sleep 1; done" if [ "$(kubectl get pod -l prometheus=rook-prometheus -nrook-ceph)" == "" ] then diff --git a/tests/scripts/github-action-helper.sh b/tests/scripts/github-action-helper.sh index dfc3f401b..b93ce5f47 100755 --- a/tests/scripts/github-action-helper.sh +++ b/tests/scripts/github-action-helper.sh @@ -428,7 +428,7 @@ function deploy_multus() { kubectl create namespace rook-ceph || true # install network attachment definitions - IFACE="eth0" # the runner has eth0 so we don't need any heureustics to find the interface + IFACE="eth0" # the runner has eth0 so we don't need any heuristics to find the interface kubectl apply -f - <