Skip to content

Commit

Permalink
Introduce Go Report Card and fix minor typos (#346)
Browse files Browse the repository at this point in the history
* Introduce Go Report Card and fix misspellings

* Update operator/pkg/reconciliation/utils.go

Co-authored-by: Jim Dickinson <jim.dickinson@gmail.com>

Co-authored-by: Madhavan Sridharan <madhavan.sridharan@datastax.com>
Co-authored-by: Jim Dickinson <jim.dickinson@gmail.com>
  • Loading branch information
3 people committed Jan 22, 2021
1 parent 34e9aa0 commit 694aebd
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cass Operator
[![Gitter](https://badges.gitter.im/cass-operator/community.svg)](https://gitter.im/cass-operator/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Go Report Card](https://goreportcard.com/badge/github.com/datastax/cass-operator)](https://goreportcard.com/report/github.com/datastax/cass-operator)
[![License: Apache License 2.0](https://img.shields.io/github/license/datastax/cass-operator)](https://github.com/msmygit/cass-operator/blob/master/LICENSE.txt)

The DataStax Kubernetes Operator for Apache Cassandra&reg;

Expand Down
2 changes: 1 addition & 1 deletion mage/ginkgo/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (ns NsWrapper) Terminate() {
}

if len(errMsgs) > 0 {
msg := fmt.Sprintf("One or more errors occured while cleaning up test resources.\n%s", strings.Join(errMsgs, "\n"))
msg := fmt.Sprintf("One or more errors occurred while cleaning up test resources.\n%s", strings.Join(errMsgs, "\n"))
err := fmt.Errorf(msg)
Expect(err).ToNot(HaveOccurred())
}
Expand Down
2 changes: 1 addition & 1 deletion mage/kubectl/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func waitForOutputPattern(k KCmd, pattern string, seconds int) error {
expectedPhrase = "Expected output to match regex: "
msg := fmt.Sprintf("Timed out waiting for value. %s '%s', but '%s' did not match", expectedPhrase, pattern, actual)
if err != nil {
msg = fmt.Sprintf("%s\nThe following error occured while querying k8s: %v", msg, err)
msg = fmt.Sprintf("%s\nThe following error occurred while querying k8s: %v", msg, err)
}
e := fmt.Errorf(msg)
return e
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
dcs := reconciliation.DatacentersForNode(nodeName)

for _, dc := range dcs {
log.Info("node watch adding reconcilation request",
log.Info("node watch adding reconciliation request",
"cassandraDatacenter", dc.Name,
"namespace", dc.Namespace)

Expand Down Expand Up @@ -202,7 +202,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {

dcName := pvcLabels[api.DatacenterLabel]

log.Info("PersistentVolumeClaim watch adding reconcilation request",
log.Info("PersistentVolumeClaim watch adding reconciliation request",
"cassandraDatacenter", dcName,
"namespace", pvcNamespace)

Expand Down
4 changes: 2 additions & 2 deletions operator/pkg/psp/emm.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ func (impl *EMMServiceImpl) performEvacuateDataPodReplace() (bool, error) {
// the pod is unschedulable. The reasons are, unfortunately,
// buried within human readable explanation text. As a result,
// a pod might not get scheduled due to no nodes having
// sufficent memory, and then we delete a PVC thinking that
// sufficient memory, and then we delete a PVC thinking that
// the PVC was causing scheduling to fail even though it
// wasn't.

Expand Down Expand Up @@ -590,7 +590,7 @@ func checkNodeEMM(provider EMMService) result.ReconcileResult {
// cluster.
racksWithDownPods := provider.getRacksWithNotReadyPodsBootstrapped()

// If we have multipe racks with down pods we will need to fail any
// If we have multiple racks with down pods we will need to fail any
// EMM operation as cluster availability is already compromised.
if len(racksWithDownPods) > 1 {
allTaintedNameSet := utils.UnionStringSet(plannedDownNodeNameSet, evacuateDataNodeNameSet)
Expand Down
4 changes: 2 additions & 2 deletions operator/pkg/reconciliation/reconcile_racks.go
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ func (rc *ReconciliationContext) CreateUsers() result.ReconcileResult {
rc.Recorder.Eventf(dc, corev1.EventTypeNormal, events.CreatedUsers,
"Created users")

// For backwards compatiblity
// For backwards compatibility
rc.Recorder.Eventf(dc, corev1.EventTypeNormal, events.CreatedSuperuser,
"Created superuser")

Expand Down Expand Up @@ -1348,7 +1348,7 @@ func (rc *ReconciliationContext) labelSeedPods(rackInfo *RackInformation) (int,
}

// GetStatefulSetForRack returns the statefulset for the rack
// and whether it currently exists and whether an error occured
// and whether it currently exists and whether an error occurred
func (rc *ReconciliationContext) GetStatefulSetForRack(
nextRack *RackInformation) (*appsv1.StatefulSet, bool, error) {

Expand Down
2 changes: 1 addition & 1 deletion operator/pkg/reconciliation/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func buildResourceRequirements(cpuMillis int64, memoryMB int64) corev1.ResourceR
}
}

// Determines if the given resource requirementw are specifed or not.
// Determines if the given resource requirements are specified or not.
func isResourceRequirementsNotSpecified(res *corev1.ResourceRequirements) bool {
if res.Limits == nil && res.Requests == nil {
return false
Expand Down

0 comments on commit 694aebd

Please sign in to comment.