8000 Feature/config from string by mateuszkwiatkowski · Pull Request #364 · coryodaniel/k8s · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Feature/config from string #364

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

Merged

Conversation

mateuszkwiatkowski
Copy link
Contributor

Add support for kubeconfig YAML string in K8s.Conn

  • Introduced from_string/2 to parse kubeconfig YAML strings.
  • Provides dynamic configuration without relying on file paths.
  • Tests added for various scenarios, including invalid configurations.

devcontainer: bump Elixir version 1.10 -> 1.14

Fixes #202

- Introduced `from_string/2` to parse kubeconfig YAML strings.
- Provides dynamic configuration without relying on file paths.
- Tests added for various scenarios, including invalid configurations.

Fixes coryodaniel#202
@mruoss
Copy link
Collaborator
mruoss commented May 29, 2025

Hi @mateuszkwiatkowski
Thanks for your contribution. Can we consolidate from_string and from_file somehow? They're basically doing the same thing now, no?

- Introduced `from_config/3` helper function to centralize code for parsing and creating connections from configurations.
- Combined similar logic from `from_file/2` and `from_string/2` into `from_config/3`.
- Unified certificate extraction with `cert_from_map/2` for both string and file paths.
- Removed redundant functions: `cert_from_map_string_only/1` and `get_auth_string_only/1`.
@mateuszkwiatkowski
Copy link
Contributor Author

@mruoss Good point! Please take a look again.

@mruoss
Copy link
Collaborator
mruoss commented Jun 8, 2025

Nice. Can you please rebase onto main (develop) and add an entry to CHANGELOG.md?

@mateuszkwiatkowski
Copy link
Contributor Author

@mruoss done!

@mateuszkwiatkowski mateuszkwiatkowski force-pushed the feature/config_from_string branch from 6947be5 to 14e49c7 Compare June 23, 2025 13:33
@mateuszkwiatkowski mateuszkwiatkowski force-pushed the feature/config_from_string branch from 14e49c7 to d53f3bb Compare June 24, 2025 14:35
@mateuszkwiatkowski
Copy link
Contributor Author

We hit the false positive in credo: rrrene/credo#1203
I disabled it for now.

@mruoss mruoss merged commit 8311780 into coryodaniel:develop Jun 26, 2025
32 of 38 checks passed
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.

Read kube config from string
2 participants
0