-
Notifications
You must be signed in to change notification settings - Fork 241
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
automatically mount service account tokens when needed #3888
Changes from all commits
c36e89d
a6938d9
3f85b23
f997e49
fc51654
7e86692
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2020,6 +2020,8 @@ class SystemPaastaConfigDict(TypedDict, total=False): | |
eks_cluster_aliases: Dict[str, str] | ||
secret_sync_delay_seconds: float | ||
use_multiple_log_readers: Optional[List[str]] | ||
service_auth_token_settings: ProjectedSAVolume | ||
always_authenticating_services: List[str] | ||
|
||
|
||
def load_system_paasta_config( | ||
|
@@ -2725,6 +2727,12 @@ def get_spark_kubeconfig(self) -> str: | |
def get_kube_clusters(self) -> Dict: | ||
return self.config_dict.get("kube_clusters", {}) | ||
|
||
def get_service_auth_token_volume_config(self) -> ProjectedSAVolume: | ||
return self.config_dict.get("service_auth_token_settings", {}) | ||
Comment on lines
+2730
to
+2731
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lol this difference in name is going to trip me up in the future, I just know it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lol, apologies, I'm a terrible human being. I created this config first thinking that each JSON file is loaded in a different "namespace", but then realized that everything gets flattened out, so started adding words over words to the key. |
||
|
||
def get_always_authenticating_services(self) -> List[str]: | ||
return self.config_dict.get("always_authenticating_services", []) | ||
|
||
|
||
def _run( | ||
command: Union[str, List[str]], | ||
|
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 might be worth doing a more generic dedupe in the future - presumably having user-supplied duplicates is also something we'd like to avoid on top of preventing folks from colliding with the auto-mounted token-config volume
i.e., we probably wanna figure out a central place to dedupe all volume configs and handle all of them consistently :p
paasta/paasta_tools/kubernetes_tools.py
Line 1482 in 7e86692