Skip to content
This repository was archived by the owner on Jan 16, 2023. It is now read-only.

Commit f0d38d7

Browse files
vkumbhar94pranay-lonkar-logicmonitorlmshubhashrilmvaibhavk
authored
Release 6.0.0 beta (#169)
* fix(device group): fetch device groups by parentId and name fetch device groups by parentId and name as previously it was fetching by name only so it was creating an issue if there are many device groups by the same name Squashed commit of the following: commit 2de998d7f8407d3f4f9380ff294e53750fb512b2 Author: Pranay Lonkar <[email protected]> Date: Fri Apr 9 19:24:27 2021 +0530 DEV-74705: error log statement commit 65481c2b700d32f1e2645e447b1e53299130c7df Author: Pranay Lonkar <[email protected]> Date: Fri Apr 9 18:35:59 2021 +0530 DEV-74705: fetch device group by parentId * Added docker token for travis build. * passed image version param in script * fix(namespace groups): add namespace groups If namespace group is failed to add under any resource group then add it under remaining resource groups Squashed commit of the following: commit 5f6bbebd0dca5be35a4cf48008516ef60ad6a960 Author: Pranay Lonkar <[email protected]> Date: Wed Apr 14 16:55:04 2021 +0530 DEV-74704: add namespace groups * feat(argus metrics): expose Argus metrics endpoint read openmetrics config from ConfigMap & expose Argus metrics endpoint Squashed commit of the following: commit 971aa68701add95ce9c49ded1804f595eb623938 Author: Pranay Lonkar <[email protected]> Date: Wed Apr 14 20:25:59 2021 +0530 DEV-74282: add log fatal and change port var type commit 3a72ebc3a3c522d03b0d2cb22bf5abfd2ff0bb28 Merge: 96f956b1d c5947d8 Author: Pranay Lonkar <[email protected]> Date: Wed Apr 14 17:05:40 2021 +0530 Merge branch 'develop' into feature/DEV-74282-argus-setting-up-the-infrastructure-for-exposing-the-metrics commit 96f956b1db4f7adcdf8ba0ba8fe7974672282141 Author: Pranay Lonkar <[email protected]> Date: Wed Apr 7 16:59:13 2021 +0530 DEV-74282: added comment on config commit de1b264e7bebf957a357f21da4cd2e621de73ee2 Author: Pranay Lonkar <[email protected]> Date: Wed Apr 7 15:37:05 2021 +0530 DEV-74282: expose metrics endpoint * fix(empty-devicename): Added check for empty device name. Squashed commit of the following: commit c2646f592a3f7dc24097e2a91a6152c3e4589693 Author: Shubhashri Shirode <[email protected]> Date: Fri May 7 17:56:47 2021 +0530 DEVTS-10495: fixed review comments. commit 7b8778f5255209e13318e8523dbf87170fb019dd Author: Shubhashri Shirode <[email protected]> Date: Thu May 6 14:31:20 2021 +0530 DEVTS-10495:review comments fixed. commit 371284d4e721c56bcb9fa80eda0e1b1f5df3cef7 Author: Shubhashri Shirode <[email protected]> Date: Wed May 5 19:31:22 2021 +0530 DEVTS-10495:corrected log formats. commit 4f289798400cea963c30c2e9e72c5a72ab7fa2e4 Author: Shubhashri Shirode <[email protected]> Date: Wed May 5 19:16:07 2021 +0530 DEVTS-10495:corrected typo. commit 8e0cf7e2c366f067778a7ed9dcb770b3fde43f55 Author: Shubhashri Shirode <[email protected]> Date: Wed May 5 19:15:00 2021 +0530 DEVTS-10495:calculated latency for delete event. commit 8940a30ab1218af2fc564ceab0c4f19768beb143 Author: Shubhashri Shirode <[email protected]> Date: Wed May 5 17:23:01 2021 +0530 corrected error log. commit dc5b81ce0eb3795f0c46a7dddc109fe233d04dff Author: Shubhashri Shirode <[email protected]> Date: Wed May 5 16:44:12 2021 +0530 fix(empty-resource-name):Adde ed check for empty resource name. * feat(*): improve application performance in terms of LM calls, etc Redesign argus code structure and improve each code part of argus BREAKING CHANGE: Changes argus behaviour Squashed commit of the following: commit 11a40f02f6272a7a612f48c745b98acd040ab147 Author: vaibhav.kumbhar <[email protected]> Date: Mon May 24 13:20:22 2021 +0530 dev-vk: config watcher started commit ba72ced69de04792b6775359984fc2f472d784b1 Author: vaibhav.kumbhar <[email protected]> Date: Mon May 24 12:32:12 2021 +0530 dev-vk: constant access levels changed commit 938cf1eed13fa934351cfaaa721a089514f9c1d5 Author: vaibhav.kumbhar <[email protected]> Date: Thu May 20 14:59:45 2021 +0530 dev-vk: removed dead code commit 2010ffe9f9a78d28823ba35ce2f74f20ea7785ca Author: vaibhav.kumbhar <[email protected]> Date: Wed May 19 19:09:35 2021 +0530 dev-vk: removed dead code from device manager commit 15ee349268bc263bf55c8053a34c79d87f99fbe8 Merge: 38e772527 3da07d1 Author: vaibhav.kumbhar <[email protected]> Date: Wed May 19 18:23:33 2021 +0530 Merge branch 'develop' into dev-vk-refactoring commit 38e772527d91d14ca803a05a0c74addb76612bb5 Author: vaibhav.kumbhar <[email protected]> Date: Tue May 18 20:09:28 2021 +0530 dev-vk: config load backward compatible commit b48b224fa2d97b16f83d3dae64c74e6b6d426de5 Author: vaibhav.kumbhar <[email protected]> Date: Thu May 13 14:58:44 2021 +0530 dev-vk: mod commit 6a1d5bb9dd1b13fe32494a4fbd685e850d28d9c7 Author: vaibhav.kumbhar <[email protected]> Date: Wed May 12 21:14:52 2021 +0530 dev-vk: remove managed fields from event context commit 7147fcdc5cca8eddf4d38372418bfb00cf46fbc2 Author: vaibhav.kumbhar <[email protected]> Date: Wed May 12 16:29:47 2021 +0530 dev-vk: something commit dfe3825fdd24ad72351594e1746ee2f69cda6468 Author: vaibhav.kumbhar <[email protected]> Date: Wed May 12 09:06:33 2021 +0530 dev-vk: which tool commit 652ff9a2a58ba197219395a86db7c133a0c1605b Author: vaibhav.kumbhar <[email protected]> Date: Wed May 12 08:43:11 2021 +0530 dev-vk: import improval commit 006042ee62c945aa4da1ae30aefe8282867ebc87 Author: vaibhav.kumbhar <[email protected]> Date: Wed May 12 00:36:57 2021 +0530 dev-vk: something commit b42175b13859e783489802d592aa5805287c24a9 Author: vaibhav.kumbhar <[email protected]> Date: Wed May 12 00:21:11 2021 +0530 dev-vk: local runner commit f29c122ae93d61e9d891203f774c1465c25dcaed Author: vaibhav.kumbhar <[email protected]> Date: Wed May 12 00:05:30 2021 +0530 dev-vk: linters commit 078fe7d3dac5c16bbbc0bcb3f7b67242c4214372 Author: vaibhav.kumbhar <[email protected]> Date: Tue May 11 20:53:02 2021 +0530 dev-vk: fixed something commit e21f5aa24df049b302bd50ab15c50264f13c8bf7 Author: vaibhav.kumbhar <[email protected]> Date: Tue May 11 14:14:29 2021 +0530 dev-vk: goroutine id in log context commit b2858101b850de0fb52149d201bba5c4858e0c83 Author: vaibhav.kumbhar <[email protected]> Date: Tue May 11 00:02:45 2021 +0530 dev-vk: resolve conflict commit ba9fa133161755326c2d6750065a3e8ac8f7dc0c Merge: 70710b8c2 44fb38a Author: vaibhav.kumbhar <[email protected]> Date: Mon May 10 22:42:10 2021 +0530 Merge branch 'develop' into dev-vk-refactoring commit 70710b8c2949703c77c5b4de5a272ae03ed96fc5 Author: vaibhav.kumbhar <[email protected]> Date: Mon May 10 16:10:51 2021 +0530 dev-vk: template, port, multiline lint command commit bd8281b91151dc505483e59478ab6c846069b42d Author: vaibhav.kumbhar <[email protected]> Date: Mon May 10 14:58:38 2021 +0530 dev-vk: new changes ... and 4 more commits * feat(argus): remove resource conflicts handling do not create conflicts group do not add conflicts category on any resource Squashed commit of the following: commit 48f3d53aafc8c92997da20631bb23a659f0f6fc6 Author: vaibhav.kumbhar <[email protected]> Date: Wed May 26 13:13:45 2021 +0530 dev-vk: something new commit 4fc2aa68c675a6734f3228d9590dae902aeb38c0 Author: vaibhav.kumbhar <[email protected]> Date: Tue May 25 18:16:23 2021 +0530 dev-vk: func name renamed commit 4ab6fe32fdaa0d728156ff99fd23bad35e978b45 Author: vaibhav.kumbhar <[email protected]> Date: Tue May 25 17:59:19 2021 +0530 dev-vk: unused constants commit 1419c01161cb6afb1a5f478472746c51dd7f0cfd Author: vaibhav.kumbhar <[email protected]> Date: Tue May 25 17:45:23 2021 +0530 dev-vk: conflicts grp removed commit 7458501a4b44a28f3fe4a4020e4e25f9fbaaacf5 Author: vaibhav.kumbhar <[email protected]> Date: Tue May 25 11:51:53 2021 +0530 dev-vk: unused remove * feat(argus): remove conflict category on upgrade resolve conflicts gracefully Squashed commit of the following: commit 3102993e707307c703315db00c5ef5252dea0da6 Author: vaibhav.kumbhar <[email protected]> Date: Wed May 26 15:53:02 2021 +0530 dev-vk: remove conflicts category while upgrading * fix(old-cache-impl): remove old cache impl Remove DeviceCache struct implementation Squashed commit of the following: commit bb7499d925e4e62c209e90eadf82a5713143cd80 Author: vaibhav.kumbhar <[email protected]> Date: Thu May 27 12:52:34 2021 +0530 dev-vk: linter fix commit 4aae32cf19618da43213992760481955e3222597 Author: vaibhav.kumbhar <[email protected]> Date: Thu May 27 11:49:51 2021 +0530 dev-vk: dead code - remove old cache impl * feat(watcher-handlers): don't update previous resource using UID match Correlate UID match while updating the resource. If UID does not match, argus will first try to delete previous resource and add new resource. Squashed commit of the following: commit 7ad12cad0f5d4271e4e9ace697b2430a56cb2ee3 Author: vaibhav.kumbhar <[email protected]> Date: Tue Jun 1 10:31:56 2021 +0530 dev-vk: comments commit 56382f58798830399a7664da21e50329995e501c Author: vaibhav.kumbhar <[email protected]> Date: Mon May 31 14:52:30 2021 +0530 dev-vk: something commit 700224eba0a1eaecf81fa69b55bd8fd3b3f8d4b7 Author: vaibhav.kumbhar <[email protected]> Date: Mon May 31 13:17:53 2021 +0530 dev-vk: mark delete init sync commit a7d429ae8e9e69adad2af482ebb3d32d13ae5b46 Author: vaibhav.kumbhar <[email protected]> Date: Sun May 30 00:08:45 2021 +0530 dev-vk: dev-vk: uid match for correlation and ignore updating prev resource * refactor(gomodguard): enable gomodguard to block and allow modules block yaml v2 library block spew library as it considered log flooder as it dumps all fields of object Squashed commit of the following: commit 1080ce6e957987fb2b96198077fd3cfe372b0073 Author: Vaibhav Kumbhar <[email protected]> Date: Wed Jun 2 20:24:53 2021 +0530 dev-vk: block spew commit ba783823c07942dbf867db47946eb510e1532bac Author: Vaibhav Kumbhar <[email protected]> Date: Wed Jun 2 18:29:56 2021 +0530 dev-vk: gomodguard config moved to golangci commit 734443fd463eb7680ebf093b5a46b553c881f777 Author: vaibhav.kumbhar <[email protected]> Date: Wed Jun 2 13:59:56 2021 +0530 dev-vk: gomodguard config in golangci-lint config * feat(*): improve resource group performance handle resource group apis to backoff and retry apis on rate limit thresholds Squashed commit of the following: commit 047467d28828ac018df6dd18dfc8b74bef902b5e Author: Vaibhav Kumbhar <[email protected]> Date: Thu Jul 1 00:21:14 2021 +0530 dev-vk: update cache commit c4b3e446ae9c6207ba11f14d6baa49295e3cb2b1 Author: Vaibhav Kumbhar <[email protected]> Date: Thu Jul 1 00:14:56 2021 +0530 dev-vk: review comments commit aa3e843e59b38f22358968135befebf0b68b4d5c Author: Vaibhav Kumbhar <[email protected]> Date: Wed Jun 30 08:35:16 2021 +0530 dev-vk: timeout commit 0f2cdb69dc1f0e356e05b8b52fd6b66fe799ac27 Author: Vaibhav Kumbhar <[email protected]> Date: Tue Jun 29 15:47:41 2021 +0530 dev-vk: sleep commit 458b78530184306969a2d7da16e258f975f9343b Author: Vaibhav Kumbhar <[email protected]> Date: Tue Jun 29 15:41:17 2021 +0530 dev-vk: defer commit 38e44f7a8fc4d84be78c4e3596ee328e2bb876dc Author: Vaibhav Kumbhar <[email protected]> Date: Tue Jun 29 15:29:09 2021 +0530 dev-vk: bug commit 6ec2d57bee539d00984f70984bd0f22d18516894 Author: Vaibhav Kumbhar <[email protected]> Date: Tue Jun 29 15:19:37 2021 +0530 dev-vk: revierw comments commit a5d2ca8f8542a32b6a71044e0d8269e30d29ea71 Author: Vaibhav Kumbhar <[email protected]> Date: Tue Jun 29 14:58:44 2021 +0530 dev-vk: defauls sync times commit 41c3492e8333fcafe0e2ecd785b7ce6027ded6e1 Author: Vaibhav Kumbhar <[email protected]> Date: Tue Jun 29 12:15:08 2021 +0530 dev-vk: more commit 8a3ab93d267798fcb3c4bf05c1d0119b73500532 Author: Vaibhav Kumbhar <[email protected]> Date: Thu Jun 24 22:21:18 2021 +0530 dev-vk: as commit bff07dac1d065dd39f9cf5a581bbe5886c69ebc7 Author: Vaibhav Kumbhar <[email protected]> Date: Thu Jun 24 16:36:31 2021 +0530 dev-vk: something commit b02711c32f001f3b97fcdedf7e450a1888da3988 Author: Vaibhav Kumbhar <[email protected]> Date: Thu Jun 24 15:40:18 2021 +0530 dev-vk: abc commit b332fb9ae765762cf1614f394b7c86abfa72141d Author: Vaibhav Kumbhar <[email protected]> Date: Thu Jun 24 15:33:39 2021 +0530 dev-vk: telemetry commit cb67a590bfa8c3b4b07ebd42c42fb2f9e119ba45 Author: Vaibhav Kumbhar <[email protected]> Date: Wed Jun 23 09:45:37 2021 +0530 dev-vk: sdk update commit 0f5fcf7a3b9683adcd8b6f2177d5ff9e78f8ff18 Author: Vaibhav Kumbhar <[email protected]> Date: Wed Jun 23 08:48:48 2021 +0530 dev-vk: something new commit ce862fcf8478a81617b8f1e81fdefdba90ca933b Author: Vaibhav Kumbhar <[email protected]> Date: Tue Jun 15 17:16:03 2021 +0530 dev-vk: cache to types commit a8c28aa0b010784fe5884b2099cc9ef239731d94 Author: Vaibhav Kumbhar <[email protected]> Date: Mon Jun 14 22:05:16 2021 +0530 dev-vk: device to resource renaming commit e5ca7155f8f04e57a2b7e331814f4376de1079c2 Author: Vaibhav Kumbhar <[email protected]> Date: Mon Jun 14 18:12:15 2021 +0530 dev-vk: lint commit 8ea0b2dbcf1fa6b6bd40f42afe2bfe3e638acdee Author: Vaibhav Kumbhar <[email protected]> Date: Wed Jun 9 14:38:17 2021 +0530 dev-vk: something extra commit 2781cd37113efd48b9d6df75920dbd70727be77b Author: Vaibhav Kumbhar <[email protected]> Date: Tue Jun 8 18:24:49 2021 +0530 dev-vk: something ... and 4 more commits * fix(cscutil): handle uninitalized csc client error return err if csc client is nil Squashed commit of the following: commit c814d6e65a3c2ddf86787faa6eb6c17ef37b9201 Author: Vaibhav Kumbhar <[email protected]> Date: Mon Jul 5 15:42:21 2021 +0530 dev-vk: npe * feat(*): pass convert arbitrary logs to contextual logs pass lmcontext at every places Squashed commit of the following: commit 9ca8f77cdd309f1d0e2ac6d9e02578fad2c103da Author: Vaibhav Kumbhar <[email protected]> Date: Tue Jul 6 11:02:46 2021 +0530 dev-vk: panic of nil assignment commit c2e23dbe59ec3402d000eb656a2d4016885130be Author: Vaibhav Kumbhar <[email protected]> Date: Mon Jul 5 23:22:21 2021 +0530 dev-vk: cache segregate commit 4b1750e6941c481ff41e895331756e63680459b1 Author: Vaibhav Kumbhar <[email protected]> Date: Mon Jul 5 22:53:12 2021 +0530 dev-vk: some commit 0a5055e7a2b0fe3dc2abe7312fbe001a0c0e52d0 Author: Vaibhav Kumbhar <[email protected]> Date: Mon Jul 5 22:25:42 2021 +0530 dev-vk: context passed * fix(config): gomnd lint port value nolint openmetrics default port Squashed commit of the following: commit bdd36b3de726294621cbf502cb4200da8e3aaf73 Author: Vaibhav Kumbhar <[email protected]> Date: Tue Jul 6 13:50:11 2021 +0530 dev-vk: dev-vk: lint * feat(watcher): create parallel event processor to speed up Parallel event processor with partition key to achieve some degree of parallelism along with ensuring event sequence of a same object Squashed commit of the following: commit 8a1db4f717a2665428c1ea70d6f839f7739e1be2 Author: Vaibhav Kumbhar <[email protected]> Date: Tue Jul 6 21:03:57 2021 +0530 dev-vk: filter hook commit 76b82dbc5dabc1dcf2000ed43b736fc3fac259ad Author: Vaibhav Kumbhar <[email protected]> Date: Tue Jul 6 18:21:18 2021 +0530 dev-vk: hot reload filter config commit 1422ccda83c57d5e1ec4e178ecd6116423de8fd4 Author: Vaibhav Kumbhar <[email protected]> Date: Tue Jul 6 16:51:55 2021 +0530 dev-vk: some commit fd1fc002aa277d410b5267a0f609b6223961237a Author: Vaibhav Kumbhar <[email protected]> Date: Tue Jul 6 16:35:22 2021 +0530 dev-vk: debug id commit f5543e239d668e76a99c9e09ea507e7e61fc4176 Author: Vaibhav Kumbhar <[email protected]> Date: Tue Jul 6 15:49:16 2021 +0530 dev-vk: parallelism * fix(*): fix the bugs change ldflag name to DOCKER_TAG to bring argus version reload cache rebuild time create node role group if added after first discovery Squashed commit of the following: commit 2ae7bffe0236dd4fd00366fea97347ace50c3223 Author: Vaibhav Kumbhar <[email protected]> Date: Thu Jul 8 15:53:51 2021 +0530 dev-vk: node role must be added if user adds it after node discovery commit 4aac3b054f5f4d5318362e821236f00f5514a644 Author: Vaibhav Kumbhar <[email protected]> Date: Thu Jul 8 13:46:13 2021 +0530 dev-vk: VERSION is something we set from makefile, but docker build on hub don't have this flag available so argus telemetry is not working today also commit 7f8499dfe2827f6724ab3aff89c980c9979d7859 Author: Vaibhav Kumbhar <[email protected]> Date: Thu Jul 8 13:45:57 2021 +0530 dev-vk: something * feat(enums,sync): use interface for k8s clients and sync ns groups use interface for k8s clients to fetch objects periodically delete dangling namespace groups - resource group will be deleted only if it has zero resources in it Squashed commit of the following: commit ba041f16c9582d7319769808c4ba62cb2f4454ed Author: Vaibhav Kumbhar <[email protected]> Date: Fri Jul 9 19:51:49 2021 +0530 dev-vk: msg commit ba5b8f1a874f8f4eceefbb0944bf657e68bb7c7a Author: Vaibhav Kumbhar <[email protected]> Date: Fri Jul 9 18:56:57 2021 +0530 dev-vk: moved commit a6ce071fb0b089757ad567feb2963c3ac87b6373 Author: Vaibhav Kumbhar <[email protected]> Date: Fri Jul 9 18:55:35 2021 +0530 dev-vk: moved commit d297ef360fd6041c00f8fd270d458d2aedc12156 Author: Vaibhav Kumbhar <[email protected]> Date: Fri Jul 9 18:48:24 2021 +0530 dev-vk: sa commit a864a3637dd598c34c09fd8704dfcbffce7d03bc Author: Vaibhav Kumbhar <[email protected]> Date: Fri Jul 9 18:44:34 2021 +0530 dev-vk: lint commit 3eceafa8b50fb87094ef0430664448c9a3e0fa9d Author: Vaibhav Kumbhar <[email protected]> Date: Fri Jul 9 18:14:10 2021 +0530 dev-vk: delete dangling ns commit 9b63d8e002096fb7920fed174e57d43fb21142bc Author: Vaibhav Kumbhar <[email protected]> Date: Fri Jul 9 15:10:38 2021 +0530 dev-vk: bug commit 1ca3785be38f931ecba6095eeda3d5431518e7ca Author: Vaibhav Kumbhar <[email protected]> Date: Fri Jul 9 14:56:25 2021 +0530 dev-vk: ut commit 5956cf4dc187a50348d29d2a8f3434c6aff355a7 Author: Vaibhav Kumbhar <[email protected]> Date: Fri Jul 9 14:15:59 2021 +0530 dev-vk: ignore ns enum from resource tree commit 1a99d4cd72237102e6578eaf4d5f8ad3320d395b Author: Vaibhav Kumbhar <[email protected]> Date: Thu Jul 8 20:15:57 2021 +0530 dev-vk: something more * feat(watcher): handle resource deletion with stale object context delete resource using old event object Squashed commit of the following: commit 132a865994e93458341a7699d5d64c6c7c73fee3 Author: Vaibhav Kumbhar <[email protected]> Date: Tue Jul 13 16:03:22 2021 +0530 dev-vk: lint commit 60c68f9f9ebb5fee032a0211f7b1ca89fb385d52 Author: Vaibhav Kumbhar <[email protected]> Date: Tue Jul 13 15:14:37 2021 +0530 dev-vk: dfs * Pull request #126: DEV-79629, DEV-79394 fix(docker,config): return copy of config return copy of config docker tag inject hook Squashed commit of the following: commit f3eb9b17fd854ff8975afd1768e0e6fd52cf6746 Author: Vaibhav Kumbhar <[email protected]> Date: Fri Jul 16 19:43:43 2021 +0530 dev-vk: sio commit 724cbfe56fbb0600b145890bc7404acc068579be Author: Vaibhav Kumbhar <[email protected]> Date: Fri Jul 16 19:34:22 2021 +0530 dev-vk: sd commit f238ce51cc94efc51591c589aec76bbc409bd1d5 Author: Vaibhav Kumbhar <[email protected]> Date: Fri Jul 16 19:07:42 2021 +0530 dev-vk: some fixes * release-6.0.0: removed pkg directory Co-authored-by: Pranay Lonkar <[email protected]> Co-authored-by: Shubhashri Shirode <[email protected]> Co-authored-by: Vaibhav Kumbhar <[email protected]>
1 parent 12ce3b0 commit f0d38d7

File tree

1,637 files changed

+82996
-45046
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,637 files changed

+82996
-45046
lines changed

.dockerignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
*
2-
!Gopkg*
32
!cmd
43
!hack
54
!main.go
65
!pkg
76
!scripts
87
!vendor
8+
!.golangci.yml
9+
!.gomodguard.yaml
10+
!go.mod
11+
!go.sum

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ coverage.txt
33
coverage.html
44
pkg/mocks
55
**/gomock*
6+
.idea
7+
argus.rc
8+
localrun.logs

.golangci.yml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
2+
run:
3+
concurrency: 70
4+
timeout: 10m
5+
skip-dirs:
6+
- "(^|/)mocks($|/)"
7+
allow-parallel-runners: true
8+
modules-download-mode: vendor
9+
linters:
10+
enable:
11+
- asciicheck
12+
- bodyclose
13+
- cyclop
14+
- deadcode
15+
- depguard
16+
- dogsled
17+
- dupl
18+
- durationcheck
19+
- errcheck
20+
- errorlint
21+
- exhaustive
22+
- exportloopref
23+
- forbidigo
24+
- gci
25+
- gochecknoinits
26+
- gocognit
27+
- goconst
28+
- gocritic
29+
- gocyclo
30+
- gofmt
31+
- gofumpt
32+
- goheader
33+
- goimports
34+
- gomnd
35+
- gomoddirectives
36+
- gomodguard
37+
- goprintffuncname
38+
- gosec
39+
- gosimple
40+
- govet
41+
- ifshort
42+
- importas
43+
- ineffassign
44+
- makezero
45+
- misspell
46+
- nakedret
47+
- nilerr
48+
- noctx
49+
- prealloc
50+
- predeclared
51+
- revive
52+
- rowserrcheck
53+
- sqlclosecheck
54+
- staticcheck
55+
- structcheck
56+
- stylecheck
57+
- testpackage
58+
- thelper
59+
- tparallel
60+
- typecheck
61+
- unconvert
62+
- unused
63+
- varcheck
64+
- wastedassign
65+
disable:
66+
- wsl
67+
- interfacer
68+
- gochecknoglobals
69+
- nolintlint
70+
- goerr113
71+
- lll
72+
- exhaustivestruct
73+
- nlreturn
74+
- whitespace
75+
- nestif
76+
- scopelint
77+
- godox
78+
- godot
79+
- unparam
80+
- wrapcheck
81+
- forcetypeassert
82+
- paralleltest
83+
- maligned
84+
- funlen
85+
linters-settings:
86+
gomoddirectives:
87+
replace-allow-list:
88+
- github.com/coreos/bbolt
89+
importas:
90+
alias:
91+
- pkg: k8s.io/apimachinery/pkg/apis/(\w+)/(v[\w\d]+)
92+
alias: $1$2
93+
- pkg: github.com/logicmonitor/k8s-argus/pkg/log
94+
alias: lmlog
95+
- pkg: github.com/logicmonitor/k8s-argus/pkg/rl
96+
alias: rlm
97+
- pkg: github.com/logicmonitor/k8s-argus/pkg/utilities
98+
alias: util
99+
- pkg: k8s.io/api/(\w+)/(v[\w\d]+)
100+
alias: $1$2
101+
- pkg: github.com/sirupsen/logrus
102+
alias: logrus
103+
- pkg: k8s.io/client-go/tools/cache
104+
alias: toolscache
105+
- pkg: github.com/logicmonitor/k8s-argus/pkg/rl
106+
alias: ratelimiter
107+
- pkg: k8s.io/apimachinery/pkg/types
108+
alias: k8stypes
109+
gomodguard:
110+
allowed:
111+
domains:
112+
- golang.org
113+
- k8s.io
114+
- google.golang.org/grpc
115+
- github.com/prometheus
116+
- github.com/go-openapi
117+
- github.com/google
118+
- github.com/coreos/etcd
119+
- github.com/golang
120+
121+
modules:
122+
- github.com/sirupsen/logrus
123+
- github.com/robfig/cron/v3
124+
- github.com/Knetic/govaluate
125+
- github.com/stretchr/testify
126+
- github.com/kelseyhightower/envconfig
127+
- github.com/spf13/cobra
128+
- gopkg.in/yaml.v3
129+
- github.com/logicmonitor/lm-sdk-go
130+
- github.com/logicmonitor/k8s-collectorset-controller
131+
132+
blocked:
133+
modules:
134+
- gopkg.in/yaml.v2:
135+
recommendations:
136+
- gopkg.in/yaml.v3
137+
reason: "v3 is recommended to use, not v2"
138+
- github.com/davecgh/go-spew:
139+
reason: considered to be log flooder; not supposed to use as it dumps whole object using reflection

Dockerfile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,20 @@ ARG VERSION
44
COPY ./ ./
55
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /argus -ldflags "-X \"github.com/logicmonitor/k8s-argus/pkg/constants.Version=${VERSION}\""
66

7+
FROM golangci/golangci-lint:v1.40 as lint
8+
WORKDIR $GOPATH/src/github.com/logicmonitor/k8s-argus
9+
COPY --from=build $GOPATH/src/github.com/logicmonitor/k8s-argus ./
10+
RUN golangci-lint run -v
11+
# to copy file in last image, otherwise docker buildkit ignore this stage if no dependency
12+
RUN touch /marker
13+
714
FROM golang:1.14 as test
815
WORKDIR $GOPATH/src/github.com/logicmonitor/k8s-argus
9-
RUN go get -u github.com/alecthomas/gometalinter
10-
RUN go get github.com/golang/mock/mockgen
11-
RUN gometalinter --install
16+
RUN GO111MODULE=on go get github.com/golang/mock/[email protected]
1217
COPY --from=build $GOPATH/src/github.com/logicmonitor/k8s-argus ./
1318
RUN go generate ./...
14-
RUN chmod +x ./scripts/test.sh; sync; ./scripts/test.sh
19+
# RUN chmod +x ./scripts/test.sh; sync; ./scripts/test.sh
20+
RUN go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
1521
RUN cp coverage.txt /coverage.txt
1622

1723
FROM alpine:3.6
@@ -21,6 +27,7 @@ RUN apk --update add ca-certificates \
2127
&& rm -rf /var/lib/apk/*
2228
WORKDIR /app
2329
COPY --from=test /coverage.txt /coverage.txt
30+
COPY --from=lint /marker /marker
2431
COPY --from=build /argus /bin
2532

2633
ENTRYPOINT ["argus"]

Dockerfile.lint

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM golangci/golangci-lint:v1.40
2+
WORKDIR $GOPATH/src/github.com/logicmonitor/k8s-argus
3+
COPY ./ ./
4+
RUN go list
5+
RUN golangci-lint run -v

0 commit comments

Comments
 (0)