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

Bring Your Own Kubernetes: EKS support MVP #829

Merged
merged 12 commits into from
Apr 21, 2022
Merged

Bring Your Own Kubernetes: EKS support MVP #829

merged 12 commits into from
Apr 21, 2022

Conversation

RemyDeWolf
Copy link
Contributor

@RemyDeWolf RemyDeWolf commented Apr 15, 2022

Description

Allow deploying a k8s service with Opta using the default ~/.kube/config or the KUBECONFIG env var.

This was implemented by adding a Opta registry for Helm. Which means if the user defines a k8s-service and doesn't set a provider or an environment file - we would use their local Kubeconfig to deploy that service with Opta.

Limitations:

  • only support k8s-service
  • use terraform local backend

We can address these limitations in the future, we have tickets for them in our backlog under the epic BYOK Extra Features.

See the documentation page for more information - included with this PR.

Safety checklist

  • This change is backwards compatible and safe to apply by existing users
  • This change will NOT lead to data loss
  • This change will NOT lead to downtime who already has an env/service setup

How has this change been tested, beside unit tests?

Tested on a EKS cluster created with k8s-cluster but NOT with k8s-base - instead I ran the terraform files provided with the example and then I ran opta apply on this file.

https://www.loom.com/share/ef29c8ca7b26441e8b300f87dd900009?sharedAppSource=personal_library

@codecov
Copy link

codecov bot commented Apr 15, 2022

Codecov Report

Merging #829 (ce36bf4) into main (b9ac7df) will decrease coverage by 0.13%.
The diff coverage is 54.43%.

@@            Coverage Diff             @@
##             main     #829      +/-   ##
==========================================
- Coverage   74.10%   73.96%   -0.14%     
==========================================
  Files         119      120       +1     
  Lines        7831     7905      +74     
==========================================
+ Hits         5803     5847      +44     
- Misses       2028     2058      +30     
Flag Coverage Δ
unittests 73.96% <54.43%> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
opta/commands/destroy.py 56.94% <0.00%> (-0.81%) ⬇️
opta/core/terraform.py 62.01% <0.00%> (-1.46%) ⬇️
opta/commands/apply.py 79.25% <33.33%> (-0.75%) ⬇️
opta/core/helm_cloud_client.py 52.77% <52.77%> (ø)
opta/layer.py 83.75% <84.61%> (+1.04%) ⬆️
opta/core/validator.py 92.51% <100.00%> (+0.48%) ⬆️
opta/registry.py 75.00% <100.00%> (+0.32%) ⬆️
opta/datadog_logging.py 86.00% <0.00%> (-4.00%) ⬇️
modules/base.py 79.16% <0.00%> (+0.49%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9ac7df...ce36bf4. Read the comment docs.

Copy link
Collaborator

@juandiegopalomino juandiegopalomino left a comment

Choose a reason for hiding this comment

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

lgtm, but maybe add a warning about the limitations?

@RemyDeWolf
Copy link
Contributor Author

@juandiegopalomino I added a warning for the user to save their terraform state files.
For the limitation about which modules are supported, Opta already throws a clear error message to the user such as ERROR: s3 is not a valid module type

@RemyDeWolf RemyDeWolf merged commit 8016b2f into main Apr 21, 2022
@RemyDeWolf RemyDeWolf deleted the remy/byok branch April 21, 2022 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants