There are several strategies for maintaining your DKAN site. Maintaining a DKAN site does not differ substantially from maintaining other Drupal sites.
With Drupal's inheritance model, it should not be necessary to place custom code or modules in the modules/contrib/dkan directory. Additional modules, themes, or libraries, or newer versions of ones already present in modules/contrib/dkan, can be placed in modules/custom, themes/custom, or libraries/custom. This will make maintaining your DKAN site much easier.
If it is necessary or expedient to overwrite files in the modules/contrib/dkan directory, it is recommended to keep a patch of the changes. A patch will make it possible to re-apply changes once a newer version of DKAN is added to the modules/contrib/dkan directory.
By "maintenance" we mean three specific tasks
DKAN uses a slightly modified semantic versioning system.
Major.Minor.Patch
Please note you can not use drush up with DKAN. This is because DKAN is not packaged on Drupal.org.
If you are maintaining your site with DKAN Tools, upgrading is as simple as running
dktl make --tag=<tag version>
Or update the version number in your compser.json file and run composer update:
Drupal has an inheritance model that makes it easy to override modules. Ideally you should keep all of your customizations outside of your docroot and symlink the overrides to the appropriate directory inside docroot.