Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow configuring k8s context with env var #71

Merged
merged 6 commits into from
Sep 25, 2023

Conversation

MicaiahReid
Copy link
Contributor

@MicaiahReid MicaiahReid commented Sep 25, 2023

Description

Previously, the hosts default context was always used for starting the API and running tests. This can potentially be dangerous, especially if a user is running tests locally and forgets that production contexts are currently set as their default.

This PR allows configuring the context with the KUBE_CONTEXT environment variable. If no context is set, the host's default context is still used, unless running tests, in which case the context kind-kind is used.


Checklist

  • All tests pass
  • Tests added in this PR (if applicable)

src/main.rs Outdated Show resolved Hide resolved
Copy link
Member

@CharlieC3 CharlieC3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

❗ No coverage uploaded for pull request base (develop@d4c2290). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             develop      #71   +/-   ##
==========================================
  Coverage           ?   79.64%           
==========================================
  Files              ?       11           
  Lines              ?     1076           
  Branches           ?        0           
==========================================
  Hits               ?      857           
  Misses             ?      219           
  Partials           ?        0           

@MicaiahReid MicaiahReid temporarily deployed to Development September 25, 2023 20:15 — with GitHub Actions Inactive
@MicaiahReid MicaiahReid merged commit f7e6bc3 into develop Sep 25, 2023
7 checks passed
@MicaiahReid MicaiahReid deleted the fix-test-context branch September 25, 2023 20:17
blockstack-devops pushed a commit that referenced this pull request Mar 25, 2024
## [1.1.0](v1.0.0...v1.1.0) (2024-03-25)

### Features

* allow config path to be configured via env var ([#67](#67)) ([483fb8b](483fb8b))
* allow configuring k8s context with env var ([#71](#71)) ([f7e6bc3](f7e6bc3))
* check auth header before allowing access ([#47](#47)) ([6dcb36d](6dcb36d))
* remove pods; implement deployments/stateful sets ([#75](#75)) ([6399c19](6399c19))
* status page at `GET /` and `GET /api/v1/status` routes ([#68](#68)) ([d4c2290](d4c2290))
* upgrade clarinet to v2.4.0; enable `use_nakamoto` field to configure stacks chain for nakamoto ([#89](#89)) ([521acd1](521acd1))
* upgrade to using clarinet crate to parse config  ([#46](#46)) ([d57d3a1](d57d3a1))

### Bug Fixes

* add ACCESS_CONTROL_ALLOW_HEADERS to response header ([#52](#52)) ([225d2c9](225d2c9))
* add subPath for postgres volume mount ([#73](#73)) ([7812741](7812741))
* api container spelling fix ([7b52f93](7b52f93))
* don't require auth on OPTIONS requests; configure user-id prefix to make namespace ([#51](#51)) ([9fe7972](9fe7972))
* reduce permissions for cluster role ([#54](#54)) ([2ea50ea](2ea50ea))
* removing untemplated labels ([#82](#82)) ([e92dcb5](e92dcb5))
* set img pull policy for stacks blockchain api ([0b959c2](0b959c2))
* template ([#85](#85)) ([4399177](4399177))
@blockstack-devops
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants