{"id":18726880,"url":"https://github.com/curium-rocks/k8s-jacoco-operator","last_synced_at":"2025-04-12T16:31:59.770Z","repository":{"id":65720093,"uuid":"537914171","full_name":"curium-rocks/k8s-jacoco-operator","owner":"curium-rocks","description":"Kubernetes operator to automatically inject the Jacoco agent and collect coverage data from pods","archived":false,"fork":false,"pushed_at":"2025-04-07T13:39:08.000Z","size":885,"stargazers_count":5,"open_issues_count":13,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-07T14:37:57.723Z","etag":null,"topics":["coverage","jacoco","k8s","kubernetes","nodejs","operator","test","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/curium-rocks.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-17T19:44:43.000Z","updated_at":"2024-05-07T23:40:38.000Z","dependencies_parsed_at":"2023-07-22T20:00:24.080Z","dependency_job_id":"9d76f074-e362-4172-a86a-cd4ee761849e","html_url":"https://github.com/curium-rocks/k8s-jacoco-operator","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":"curium-rocks/k8s-mutating-webhook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curium-rocks%2Fk8s-jacoco-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curium-rocks%2Fk8s-jacoco-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curium-rocks%2Fk8s-jacoco-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curium-rocks%2Fk8s-jacoco-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/curium-rocks","download_url":"https://codeload.github.com/curium-rocks/k8s-jacoco-operator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248596576,"owners_count":21130723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["coverage","jacoco","k8s","kubernetes","nodejs","operator","test","typescript"],"created_at":"2024-11-07T14:15:46.037Z","updated_at":"2025-04-12T16:31:59.301Z","avatar_url":"https://github.com/curium-rocks.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k8s-jacoco-operator\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=curium-rocks_k8s-jacoco-operator\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=curium-rocks_k8s-jacoco-operator) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=curium-rocks_k8s-jacoco-operator\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=curium-rocks_k8s-jacoco-operator) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=curium-rocks_k8s-jacoco-operator\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=curium-rocks_k8s-jacoco-operator) [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=curium-rocks_k8s-jacoco-operator\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=curium-rocks_k8s-jacoco-operator) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=curium-rocks_k8s-jacoco-operator\u0026metric=code_smells)](https://sonarcloud.io/summary/new_code?id=curium-rocks_k8s-jacoco-operator) [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=curium-rocks_k8s-jacoco-operator\u0026metric=bugs)](https://sonarcloud.io/summary/new_code?id=curium-rocks_k8s-jacoco-operator)\n\nA operator that injects the jacoco agent into pods so you can collect coverage data when running tests against Java services deployed in kubernetes.\n\n## Deploy it\nIf you don't already have cert manager installed you will need to run:\n\n``` bash\nhelm repo add jetstack https://charts.jetstack.io \u0026\u0026 helm repo update \u0026\u0026 \\\n  helm upgrade --install --namespace cert-manager --create-namespace \\\n  cert-manager jetstack/cert-manager --set installCRDs=true --debug --wait\n```\n\nAdd the helm repos `helm repo add k8s https://curium-rocks.github.io/k8s-jacoco-operator` fetch updates `helm repo update`. \n\nVerify it worked `helm search repo k8s` and you should see something like.\n\n```\nNAME                                                    CHART VERSION   APP VERSION     DESCRIPTION                                       \nk8s/k8s-jacoco-operator...      0.1.0           0.1.0           ......\n```\n\nDeploy the operator `helm upgrade --install jacoco-operator k8s/k8s-jacoco-operator`\n\n## Inject the Jacoco Agent\nOnce you've deployed the operator you can add the following annotations to your pods in the same namespace and they\nwill have the jacoco agent copied in and the appropriate env vars set so the agent used and the code is instrumented.\n\n``` yaml\njacoco-operator.curium.rocks/inject: 'true',\njacoco-operator.curium.rocks/target-containers: 'api'\n```\n\nCoverage data will be saved to a PVC on process exit, you can force this with a rollout on a deployment or \nusing exec to send a SIGINT signal to the process.\n\n## NPM Scripts\nThe following scripts are included in the NPM project configuration\n- `lint` lints the source code using eslint\n- `lint:fix` automatically fixes any lint errors that can be fixed automatically\n- `test` uses jest to run test suites\n- `test:e2e` runs e2e test suite, this requires an active helm:deploy\n- `build` compiles the typescript into js and places it in the `dist` folder\n- `build:image` builds the container image\n- `minikube:start` create a minikube k8s cluster\n- `minikube:stop` stop minikube but do not delete\n- `minikube:delete` delete the minikube cluster\n- `helm:addRepos` adds helm repos\n- `helm:deployCertManager` deploy cert-manager for TLS\n- `helm:deploy` deploy the app to k8s using helm\n- `helm:template` print the k8s yaml that would be applied to k8s when using `helm:deploy`\n- `helm:uninstall` remove the app from k8s\n- `helm:uninstallCertManager` remove cert-manager from the k8s cluster\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurium-rocks%2Fk8s-jacoco-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcurium-rocks%2Fk8s-jacoco-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurium-rocks%2Fk8s-jacoco-operator/lists"}