-
Notifications
You must be signed in to change notification settings - Fork 16
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
RT archiver v3 #1614
RT archiver v3 #1614
Conversation
5375535
to
429368d
Compare
e82b74e
to
d0bf9f7
Compare
kubernetes/apps/overlays/gtfs-rt-archiver-v3-prod/archiver-channel-vars.yaml
Outdated
Show resolved
Hide resolved
memory: 512Mi | ||
cpu: 1 | ||
limits: | ||
memory: 1Gi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to use maxmemory + an eviction policy for redis... I'll take it upon myself to add this on a derivative branch today
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not hold up the merge over this-- easy change to layer on.
operator: In | ||
values: | ||
- gtfsrtv3 | ||
podAntiAffinity: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is clever!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Did you intend for something to be in services/gtfs-rt-archiver-v3/README.rst? Also, why restructured text vs markdown?
Ah nope that's just a file that poetry automatically creates, will remove or add content. |
Co-authored-by: Mjumbe Poe <[email protected]>
… end up on the same redis in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple more thoughts below to make errors a bit more readable(?). Also, for posterity, could you link to cal-itp/calitp-py#69 from the description?
AUTH_KEYS = [ | ||
"AC_TRANSIT_API_KEY", | ||
"AMTRAK_GTFS_URL", | ||
"CULVER_CITY_API_KEY", | ||
"MTC_511_API_KEY", | ||
"SD_MTS_SA_API_KEY", | ||
"SD_MTS_VP_TU_API_KEY", | ||
"SWIFTLY_AUTHORIZATION_KEY_CALITP", | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought (non-blocking): These hard-coded key names bother me, but only a little. I guess on one hand they could be seen as a feature, declaring explicitly which auth keys are supported/configured. OTOH, would it be fine to just declare that in the environment and not doubly here?
If a feed maintainer (e.g. Evan) should be able to add a feed with auth without having to worry about a code change, then we could just prefix the env variables with something like ARCHIVER_AUTH__
and pull in anything from the environment with that prefix, stripping the prefix to create the auth_dict
.
However, if having these explicitly laid out here is actually a feature, then it's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think it's a feature but I could be convinced otherwise. Mainly, I want a source code location that signals the API keys we will read in, and whether you need to add a missing key vs fixing an existing but misconfigured key. The k8s YAML could technically contain this but that would then require changing a kustomize file vs source code in an image.
A more specific limitation is that I don't necessarily want to iterate over and/or load all secrets from Secret Manager; there may be a way to tag/categorize?
Edit: Actually now that I'm thinking about it, I do like the idea of relying on the prefix as a signal in theory. It's just tricky since right now the code has to know the keys to fetch from Secret Manager. If we were to use k8s secrets via the plugin I think the prefix idea would be great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. I definitely don't think this is a blocker. It's something that can be revisited if it turns out to feel inefficient.
memory: 512Mi | ||
cpu: 1 | ||
limits: | ||
memory: 1Gi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not hold up the merge over this-- easy change to layer on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excited to see this go!
I am merging this since it's already deployed. CI/CD and Airtable validation can be follow-ups while we're kicking the tires on performance, metrics, and alerts. |
Description
Tech spec
Corresponding calitp-py PR
Calling this v3 because the current archiver is actually on v2.1! We already have a v3 node pool so the new node pool is v4. Versions are fun.
TODO:
k8s pluginSDK on startup to replace the manual temporary secretSet up CI/CD (also decide if we want a pre-prod)going to do this later, @lottspot has some WIP CI/CD changeshour/tick/url/
?Type of change
How has this been tested?
https://monitoring.k8s.calitp.jarv.us/d/N1XVLOe7z/gtfs-rt-archiver-v3
https://monitoring.k8s.calitp.jarv.us/d/xPWY4jL7z/gtfs-rt-archiver-resource-consumption?orgId=1&refresh=5s&var-namespace=gtfs-rt-v3
Screenshots (optional)