mittwald / harbor-operator

A Kubernetes operator for managing goharbor instances
Apache License 2.0
20 stars 4 forks source link

Use interface function to set object statuses #4

Closed elenz97 closed 4 years ago

elenz97 commented 4 years ago

https://github.com/mittwald/harbor-operator/pull/3#discussion_r420631335

Optional: There's still a bit of duplication here. This could be extracted into a shared function; since this piece of code sets the status on a concrete registry/replication/repository type, that function would instead need to operate on a generic interface { SetStatus(registriesv1alpha1.RegistryStatus) } type.

Originally posted by @martin-helmich in https://github.com/mittwald/harbor-operator/pull/3