scylladb / scylla-operator

The Kubernetes Operator for ScyllaDB
https://operator.docs.scylladb.com/
Apache License 2.0
340 stars 175 forks source link

`AggregateStatusConditions` can produce invalid Condition #2102

Open rzetelskik opened 2 months ago

rzetelskik commented 2 months ago

AggregateStatusConditions helper func can produce invalid conditions. There are two reasons:

  1. condition.Reason is constructed by concatenating Type and Reason of aggregated conditions: https://github.com/scylladb/scylla-operator/blob/fe5d18cafb48ec111add7d30df99103f63ce20f3/pkg/controllerhelpers/core.go#L64 Valid condition.Type needs to match (dns1123SubdomainFmt/)?(qualifiedNameFmt). Valid condition.Reason must be a CamelCase string. A valid Type does not always pass Reason's validation, e.g. Node_gke-so-331fe2c9-c118-489f-890-default-dfaf2fab-vb36_Progressing is a valid Type, but not a valid Reason.
  2. constructed fields can go over the size limit, there's even a TODO left: https://github.com/scylladb/scylla-operator/blob/fe5d18cafb48ec111add7d30df99103f63ce20f3/pkg/controllerhelpers/core.go#L71

/kind bug

scylla-operator-bot[bot] commented 1 month ago

The Scylla Operator project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

/lifecycle stale

scylla-operator-bot[bot] commented 3 weeks ago

The Scylla Operator project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

/lifecycle rotten

rzetelskik commented 3 weeks ago

/remove-lifecycle rotten /triage accepted