public AppReplicationControllerSummaryDTO(ReplicationController controller) { this.id = KubernetesHelper.getId(controller); this.namespace = controller.getNamespace(); this.labels = controller.getLabels(); ReplicationControllerState desiredState = controller.getDesiredState(); if (desiredState != null) { this.replicas = desiredState.getReplicas(); this.replicaSelector = desiredState.getReplicaSelector(); } }