(old, new *appsv1.StatefulSet, isUpdate bool, reasons []string)
| 198 | } |
| 199 | |
| 200 | func (c *Cluster) logStatefulSetChanges(old, new *appsv1.StatefulSet, isUpdate bool, reasons []string) { |
| 201 | if isUpdate { |
| 202 | c.logger.Infof("statefulset %s has been changed", util.NameFromMeta(old.ObjectMeta)) |
| 203 | } else { |
| 204 | c.logger.Infof("statefulset %s is not in the desired state and needs to be updated", |
| 205 | util.NameFromMeta(old.ObjectMeta), |
| 206 | ) |
| 207 | } |
| 208 | |
| 209 | logNiceDiff(c.logger, old.Spec, new.Spec) |
| 210 | |
| 211 | if !reflect.DeepEqual(old.Annotations, new.Annotations) { |
| 212 | c.logger.Debug("metadata.annotation are different") |
| 213 | logNiceDiff(c.logger, old.Annotations, new.Annotations) |
| 214 | } |
| 215 | |
| 216 | if len(reasons) > 0 { |
| 217 | for _, reason := range reasons { |
| 218 | c.logger.Infof("reason: %s", reason) |
| 219 | } |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | func (c *Cluster) logServiceChanges(role PostgresRole, old, new *v1.Service, isUpdate bool, reason string) { |
| 224 | if isUpdate { |
no test coverage detected