Skip to content

Commit

Permalink
Add helpful comments
Browse files Browse the repository at this point in the history
Signed-off-by: Carlisia <[email protected]>
  • Loading branch information
Carlisia committed Jun 19, 2020
1 parent e9fb8dd commit ff7e546
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/util/managercontroller/managercontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// TODO(2.0) After converting all controllers to runttime-controller,
// the functions in this file will no longer be needed and should be removed.
package managercontroller

import (
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/velero/v1/backupstoragelocation_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ type BackupStorageLocationStatus struct {
AccessMode BackupStorageLocationAccessMode `json:"accessMode,omitempty"`
}

// TODO(2.0) After converting all resources to use the runttime-controller client,
// the genclient and k8s:deepcopy markers will no longer be needed and should be removed.
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true
Expand All @@ -88,6 +90,8 @@ type BackupStorageLocation struct {
Status BackupStorageLocationStatus `json:"status,omitempty"`
}

// TODO(2.0) After converting all resources to use the runttime-controller client,
// the k8s:deepcopy marker will no longer be needed and should be removed.
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true

Expand Down
2 changes: 2 additions & 0 deletions pkg/cmd/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,8 @@ func (s *server) validateBackupStorageLocations() error {
pluginManager := clientmgmt.NewManager(s.logger, s.logLevel, s.pluginRegistry)
defer pluginManager.CleanupClients()

// Fetching from the server directly since at this point
// the cache has not yet started
locations := &velerov1api.BackupStorageLocationList{}
if err := s.mgr.GetAPIReader().List(context.Background(), locations, &kbclient.ListOptions{
Namespace: s.namespace,
Expand Down

0 comments on commit ff7e546

Please sign in to comment.