https://github.com/getsentry/sentry-infra-tools
Standalone repo for sentry-kube and other related tools
https://github.com/getsentry/sentry-infra-tools
tag-production
Last synced: about 1 month ago
JSON representation
Standalone repo for sentry-kube and other related tools
- Host: GitHub
- URL: https://github.com/getsentry/sentry-infra-tools
- Owner: getsentry
- Created: 2024-08-29T21:24:43.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-21T21:36:39.000Z (7 months ago)
- Last Synced: 2025-03-22T06:47:09.678Z (7 months ago)
- Topics: tag-production
- Language: Python
- Homepage:
- Size: 352 KB
- Stars: 5
- Watchers: 26
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# `sentry-kube`
```
__ __
/ | / |
$$ | __ __ __ $$ |____ ______
$$ | / |/ | / |$$ \ / \
$$ |_/$$/ $$ | $$ |$$$$$$$ |/$$$$$$ |
$$ $$< $$ | $$ |$$ | $$ |$$ $$ |
$$$$$$ \ $$ \__$$ |$$ |__$$ |$$$$$$$$/
$$ | $$ |$$ $$/ $$ $$/ $$ |
$$/ $$/ $$$$$$/ $$$$$$$/ $$$$$$$/Get kubed.
```## Installation
Run `./install.sh` to install sentry-kube.
## Releasing a new version
Versioning note: When cutting a new release we should try to follow [SemVer](https://semver.org/).
To cut a new release, we use the `Release` Github Actions Workflow. This can be triggered manually using the [UI](https://github.com/getsentry/sentry-infra-tools/actions/workflows/release.yml)

Or with the [`gh`](https://cli.github.com) CLI:
```
gh workflow run Release --field version=0.0.33
```## Help
All commands support `--help`, so please reference this.
```shell
sentry-kube --help
```## Environment Variables
`sentry-kube` can be further configured by setting environment variables.
* `SENTRY_KUBE_CONFIG_FILE`: Set this to the full path of the configuration file that contains the clusters and customers configuration for sentry-kube. It defaults to `[workspace_root]/cli_config/configuration.yaml`
* `SENTRY_KUBE_ENABLE_NOTIFICATIONS`: Set `SENTRY_KUBE_ENABLE_NOTIFICATIONS=1` to enable MacOS notifications for things like `sentry-kube connect` bastion connections
* `SENTRY_KUBE_KUBECTL_DIFF_CONCURRENCY`: Set `SENTRY_KUBE_KUBECTL_DIFF_CONCURRENCY` to make `kubectl diff` process objects in parallel
* `SENTRY_KUBE_KUBECTL_VERSION`: Set `SENTRY_KUBE_KUBECTL_VERSION=1.22.17` to configure the kubectl version to use
* `SENTRY_KUBE_NO_CONTEXT`: Set `SENTRY_KUBE_NO_CONTEXT=1` to skip checking for a functional kube context
* `SENTRY_KUBE_ROOT`: Sets the workspace root. It defaults to the git root directory.## How to use sentry-infra-tools in editable mode (for development) in another environment
Lets assume you have a local working copy of sentry-infra-tools in
`/sentry-infra-tools`. Lets assume that you made some change
in your local copy of sentry-infra-tools. But you would like to validate
the change in a different virtual environment. Here is how you can do it:1. Remove the existing sentry-infra-tools package from the environment
where you want to test it out.```shell
pip uninstall sentry-infra-tools
```2. Install the local working copy of sentry-infra-tools in editable mode. You can do this either manually as shown below.
```shell
pip install -e /sentry-infra-tools
```Or if `requirements.txt` is being used, you can remove the existing reference to `sentry-infra-tools` and add a reference to the local working copy.
```shell
# Edit python/requirements.txt
# Remove any existing reference to sentry-infra-tools
# Add the following reference to local working copy
-e /sentry-infra-tools
```and then run `pip install -r requirements.txt`.
3. Done. You should now be able to use the local working copy of sentry-infra-tools in the other environment.