{"id":28851703,"url":"https://github.com/clustergarage/argus-controller","last_synced_at":"2026-04-30T07:39:21.402Z","repository":{"id":64302951,"uuid":"137792792","full_name":"clustergarage/argus-controller","owner":"clustergarage","description":"Argus Controller - File Integrity Monitoring for Kubernetes","archived":false,"fork":false,"pushed_at":"2026-04-08T19:07:50.000Z","size":7348,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-04-30T07:38:27.838Z","etag":null,"topics":["file-integrity-monitoring","kubernetes","monitoring","security"],"latest_commit_sha":null,"homepage":"https://clustergarage.github.io/argus","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clustergarage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-18T18:46:08.000Z","updated_at":"2020-10-10T20:57:59.000Z","dependencies_parsed_at":"2023-01-15T09:45:36.046Z","dependency_job_id":null,"html_url":"https://github.com/clustergarage/argus-controller","commit_stats":null,"previous_names":["clustergarage/fim-controller"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/clustergarage/argus-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clustergarage%2Fargus-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clustergarage%2Fargus-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clustergarage%2Fargus-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clustergarage%2Fargus-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clustergarage","download_url":"https://codeload.github.com/clustergarage/argus-controller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clustergarage%2Fargus-controller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32458237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file-integrity-monitoring","kubernetes","monitoring","security"],"created_at":"2025-06-19T21:06:16.789Z","updated_at":"2026-04-30T07:39:21.396Z","avatar_url":"https://github.com/clustergarage.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# argus-controller\n\n[![go report](https://goreportcard.com/badge/github.com/clustergarage/argus-controller?style=flat-square)](https://goreportcard.com/report/github.com/clustergarage/argus-controller)\n[![Docker Automated build](https://img.shields.io/docker/build/clustergarage/argus-controller.svg?style=flat-square)](https://hub.docker.com/r/clustergarage/argus-controller)\n[![Latest Argus\nrelease](https://img.shields.io/github/release/clustergarage/argus.svg?style=flat-square)](https://github.com/clustergarage/argus)\n\nThis repository implements a Kubernetes controller for watching ArgusWatcher resources as defined with a CustomResourceDefinition.\n\n**Note**: `go get` or `go mod` this package as `clustergarage.io/argus-controller`\n\nIt leverages the Kubernetes [client-go library](https://github.com/kubernetes/client-go/tree/master/tools/cache) to interact with various mechanisms explained in [these docs](https://github.com/kubernetes/sample-controller/blob/master/docs/controller-client-go.md).\n\n## Purpose\n\nThis controller is used primarily to communicate between a running cluster and the [argusd](https://github.com/clustergarage/argusd) daemons running alongside it.\n\nIncluded within the controller are some mechanisms to speak to the Kubernetes API and the daemons to:\n\n- Gain insights into pods, endpoints, and custom ArgusWatcher CRDs being added, updated, and deleted.\n- Perform current daemon state check of watchers that it is currently hosting.\n- Notify the need to create and delete a filesystem watcher.\n- Perform health checks for readiness and liveness probes in Kubernetes.\n\n## Usage\n\n#### Prerequisites\n\n- `go v1.11+` \u0026mdash; for runtime, including module support\n- `gRPC` \u0026mdash; as a communication protocol to the daemon\n- `Protobuf` \u0026mdash; for a common type definition\n\n```\n# enable Go module support\nexport GO111MODULE=on\n```\n\n### Cloning\n\n**Note**: The GOPATH environment variable specifies the location of your workspace. If no GOPATH is set, it is assumed to be $HOME/go on Unix systems and %USERPROFILE%\\go on Windows. If you want to use a custom location as your workspace, you can set the GOPATH environment variable.\n\n```\nmkdir -p $GOPATH/src/clustergarage.io \u0026\u0026 cd $_\ngit clone git@github.com/clustergarage/argus-controller\n\n# optional: pre-download required go modules\ngo mod download\n```\n\n### Running\n\n**Note**: This assumes you have a working kubeconfig, not required if operating in-cluster.\n\n```\ngo run . -kubeconfig=$HOME/.kube/config\n```\n\nOr optionally connect to a locally-running daemon:\n\n```\n# run without secure credentials\ngo run . -kubeconfig=$HOME/.kube/config \\\n  -argusd localhost:50051\n\n# run with secure credentials\ngo run . -kubeconfig=$HOME/.kube/config \\\n  -argusd localhost:50051 \\\n  -tls \\\n  -tls-ca-cert /etc/ssl/ca.pem \\\n  -tls-client-cert /etc/ssl/cert.pem \\\n  -tls-client-key /etc/ssl/key.pem \\\n  -tls-server-name localhost\n```\n\n**Warning**: When running the controller and daemon out-of-cluster in a VM-based Kubernetes context, the daemon will fail to locate the PID from the container ID through numerous cgroup checks and will be unable to start any watchers. When using Minikube, you can `minikube mount` the daemon folder, `minikube ssh` into it and run it inside the VM. Then point the controller at the IP/Port running inside the VM with the `-argusd` flag.\n\n---\n\n#### Usage of `argus-controller`:\n\n```\nMain set of flags for connecting to the Kuberetes client and API server; hooking directly into a locally-running ArgusD server:\n\n  -kubeconfig string\n        Path to a kubeconfig. Only required if out-of-cluster.\n  -master string\n        The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.\n  -tls\n        Connect to the ArgusD server using TLS. (default: false)\n  -tls-ca-cert string\n        The file containing trusted certificates for verifying the server. (with -tls, optional)\n  -tls-client-cert string\n        The file containing the client certificate for authenticating with the server. (with -tls, optional)\n  -tls-client-key string\n        The file containing the client private key for authenticating with the server. (with -tls)\n  -tls-server-name string\n        Override the hostname used to verify the server certificate. (with -tls)\n  -tls-skip-verify\n        Do not verify the certificate presented by the server. (default: false)\n  -argusd string\n        The address of the ArgusD server. Only required if daemon is running out-of-cluster.\n  -health integer\n        The port to use for setting up the health check that will be used to monitor the controller.\n  -prometheus integer\n        The port to use for setting up Prometheus metrics. This can be used by the cluster Prometheus to scrape data.\n\nFlags for the glog logging library:\n\n  -alsologtostderr\n        log to standard error as well as files\n  -log_backtrace_at value\n        when logging hits line file:N, emit a stack trace\n  -log_dir string\n        If non-empty, write log files in this directory\n  -logtostderr\n        log to standard error instead of files\n  -stderrthreshold value\n        logs at or above this threshold go to stderr (default INFO)\n  -v value\n        log level for V logs\n  -vmodule value\n        comma-separated list of pattern=N settings for file-filtered logging\n```\n\n### Building\n\nTo build a local copy of the binary to run or troubleshoot with:\n\n```\ngo build -o bin/argus-controller\n```\n\nOr if you wish to build as a Docker container and run this from a local registry:\n\n```\ndocker build -t clustergarage/argus-controller .\n```\n\n## Testing\n\n### Unit Tests\n\nUnit tests included for the controller behavior can be run with:\n\n```\ngo test pkg/controller/*\n```\n\nRunning the tests skipping long-running tests can be done with the `-short` flag:\n\n```\ngo test -short pkg/controller/*\n```\n\nOptionally, running with [code coverage](https://blog.golang.org/cover) and generating an HTML report of the results:\n\n```\ngo test -cover -coverprofile coverage/cover.out pkg/controller/*\ngo tool cover -html coverage/cover.out\n```\n\n### Integration Tests\n\nIntegration tests included for the controller behavior can be run with:\n\n```\ngo test -tags=integration pkg/controller/*\n```\n\n---\n\n#### Code Verification\n\n```\ngo vet pkg/controller/*\ngolint pkg/controller/*\n```\n\n## Custom Resource Definition\n\nEach instance of the ArgusWatcher custom resource has an attached `Spec`, which is defined via a `struct{}` to provide data format validation. In practice, this `Spec` is arbitrary key-value data that specifies the configuration/behavior of the resource.\n\n```go\ntype ArgusWatcherSpec struct {\n  Selector  *metav1.LabelSelector `json:\"selector\"`\n  Subjects  []*ArgusWatcherSubject  `json:\"subjects\"`\n  LogFormat string                `json:\"logFormat\"`\n}\n\ntype ArgusWatcherSubject struct {\n  Paths      []string          `json:\"paths\"`\n  Events     []string          `json:\"events\"`\n  Ignore     []string          `json:\"ignore\"`\n  OnlyDir    bool              `json:\"onlyDir\"`\n  Recursive  bool              `json:\"recursive\"`\n  MaxDepth   int32             `json:\"maxDepth\"`\n  FollowMove bool              `json:\"followMove\"`\n  Tags       map[string]string `json:\"tags,omitempty\"`\n}\n```\n\n### Generating Definitions\n\nMaking use of generators to generate a typed client, informers, listers, and deep-copy functions, you can run this yourself with:\n\n**Note**: `code-generator` needs to be in the `vendor` folder until upstream Kubernetes updates to Go v1.11 for modules support.\n\n```\n# deepcopy-gen has to be installed in `$GOPATH/bin`\ngo get -u k8s.io/code-generator/cmd/deepcopy-gen\n\n./bin/update-codegen.sh\n```\n\nThe `update-codegen` script will automatically generate the following files and directories:\n\n- `pkg/apis/arguscontroller/v1alpha1/zz_generated.deepcopy.go`\n- `pkg/client/`\n\nChanges should not be made manually to these files. When updating the definitions of `pkg/apis/arguscontroller/*` you should re-run the `update-codegen` script to regenerate the files listed above.\n\n## Cleanup\n\nYou can clean up the created CustomResourceDefinition with:\n\n```\nkubectl delete crd arguswatchers.arguscontroller.clustergarage.io\n```\n\n## Documentation\n\nTo view `godoc`-style documentation generated from the code, run the following then navigate to `http://localhost:6060/pkg/clustergarage.io`:\n\n```\ngodoc -http \":6060\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclustergarage%2Fargus-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclustergarage%2Fargus-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclustergarage%2Fargus-controller/lists"}