'check to see if we need to update'

def needs_update(self):

    skip = ['secrets', 'imagePullSecrets']
    if ((self.serviceaccount is None) or (not Utils.check_def_equal(self.prepared_router['ServiceAccount']['obj'].yaml_dict, self.serviceaccount.yaml_dict, skip_keys=skip, debug=self.verbose))):
        self.prepared_router['ServiceAccount']['update'] = True
    if self.prepared_router['Secret']['obj']:
        if (not self.secret):
            self.prepared_router['Secret']['update'] = True
        if ((self.secret is None) or (not Utils.check_def_equal(self.prepared_router['Secret']['obj'].yaml_dict, self.secret.yaml_dict, skip_keys=skip, debug=self.verbose))):
            self.prepared_router['Secret']['update'] = True
    for port in self.prepared_router['Service']['obj'].get('spec.ports'):
        port['protocol'] = 'TCP'
    skip = ['portalIP', 'clusterIP', 'sessionAffinity', 'type']
    if ((self.service is None) or (not Utils.check_def_equal(self.prepared_router['Service']['obj'].yaml_dict, self.service.yaml_dict, skip_keys=skip, debug=self.verbose))):
        self.prepared_router['Service']['update'] = True
    if (self.deploymentconfig is not None):
        if (not self.config.config_options['stats_password']['value']):
            for (idx, env_var) in enumerate((self.prepared_router['DeploymentConfig']['obj'].get('spec.template.spec.containers[0].env') or [])):
                if (env_var['name'] == 'STATS_PASSWORD'):
                    env_var['value'] = self.deploymentconfig.get(('spec.template.spec.containers[0].env[%s].value' % idx))
                    break
        for (idx, port) in enumerate((self.prepared_router['DeploymentConfig']['obj'].get('spec.template.spec.containers[0].ports') or [])):
            if (not ('protocol' in port)):
                port['protocol'] = 'TCP'
    skip = ['dnsPolicy', 'terminationGracePeriodSeconds', 'restartPolicy', 'timeoutSeconds', 'livenessProbe', 'readinessProbe', 'terminationMessagePath', 'hostPort', 'defaultMode']
    if ((self.deploymentconfig is None) or (not Utils.check_def_equal(self.prepared_router['DeploymentConfig']['obj'].yaml_dict, self.deploymentconfig.yaml_dict, skip_keys=skip, debug=self.verbose))):
        self.prepared_router['DeploymentConfig']['update'] = True
    return any([self.prepared_router[oc_type]['update'] for oc_type in self.prepared_router.keys()])
