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

Added support for docdb #60

Merged
merged 2 commits into from
Feb 4, 2021
Merged

Added support for docdb #60

merged 2 commits into from
Feb 4, 2021

Conversation

juandiegopalomino
Copy link
Collaborator

@juandiegopalomino juandiegopalomino commented Feb 4, 2021

So in order for docdb to have tls encryption during transit, the guides
https://docs.aws.amazon.com/documentdb/latest/developerguide/security.encryption.ssl.html
https://docs.aws.amazon.com/documentdb/latest/developerguide/connect_programmatically.html
Call for the public keys to be downloaded/present in each container using it. The size of the file (~5kb) is just shy of 5% the capacity of a single k8s configmap value so what's happening is each deployment now has a configmap resource which for now only has 1 key (the rds ca pem) which is put in the /config/rds_ca.pem path (and there's now an envar pointing directly to that). With that in place a user can now have their app use docdb by referencing 4 environment variables: username, password, hostname, and ca_path.

WE NEED TO BE SURE TO TELL FOLKS IN OUR DOCDB MODULE DOCS TO USE THAT ENVAR.
Screen Shot 2021-02-04 at 9 56 26 AM

So in order for docdb to have tls encryption during transit, the guides
https://docs.aws.amazon.com/documentdb/latest/developerguide/security.encryption.ssl.html
https://docs.aws.amazon.com/documentdb/latest/developerguide/connect_programmatically.html
Call for the public keys to be downloaded/present in each container using it. The size of the file (~5kb) is just shy of 5% the capacity of a single k8s configmap value so what's happening is each deployment now has a configmap resource which for now only has 1 key (the rds ca pem) which is put in the /config/rds_ca.pem path (and there's now an envar pointing directly to that). With that in place a user can now have their app use docdb by referencing 4 environment variables: username, password, hostname, and ca_path.

WE NEED TO BE SURE TO TELL FOLKS IN OUR DOCDB MODULE DOCS TO USE THAT ENVAR.
@codecov
Copy link

codecov bot commented Feb 4, 2021

Codecov Report

Merging #60 (1391118) into main (a7675d1) will increase coverage by 0.62%.
The diff coverage is 91.89%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #60      +/-   ##
==========================================
+ Coverage   75.64%   76.27%   +0.62%     
==========================================
  Files          15       15              
  Lines         620      649      +29     
==========================================
+ Hits          469      495      +26     
- Misses        151      154       +3     
Flag Coverage Δ
unittests 76.27% <91.89%> (+0.62%) ⬆️

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

Impacted Files Coverage Δ
opta/plugins/secret_manager.py 91.42% <86.36%> (-3.22%) ⬇️
opta/amplitude.py 95.55% <100.00%> (+0.10%) ⬆️
opta/cli.py 72.41% <100.00%> (+2.94%) ⬆️

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 a7675d1...40ef63c. Read the comment docs.

{{- include "k8s-service.labels" . | nindent 4 }}
namespace: {{ include "k8s-service.namespaceName" . }}
data:
rds_ca.pem: |
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment here explaining where this pem was downloaded from and what it represents?

env:
- name: RDS_CA_PATH
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a comment here explaining what this env var represents

@@ -62,4 +68,14 @@ spec:
{{- toYaml .Values.podResourceLimits | nindent 14 }}
requests:
{{- toYaml .Values.podResourceRequests | nindent 14 }}
volumes:
# You set volumes at the Pod level, then mount them into containers inside that Pod
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: the comments in this section don't seem too useful

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

copy pasting lol

@juandiegopalomino juandiegopalomino merged commit 90288f3 into main Feb 4, 2021
@juandiegopalomino juandiegopalomino deleted the docdb-support branch February 4, 2021 19:23
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