{"id":16701658,"url":"https://github.com/coryodaniel/k8s_conf","last_synced_at":"2025-04-10T04:12:04.343Z","repository":{"id":57511197,"uuid":"162487736","full_name":"coryodaniel/k8s_conf","owner":"coryodaniel","description":"Parse Kubernetes' config files and generate HTTP headers/options for authenticating to the k8s API.","archived":false,"fork":false,"pushed_at":"2019-01-26T19:10:57.000Z","size":30,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T05:34:43.805Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coryodaniel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-19T20:33:24.000Z","updated_at":"2020-04-28T12:27:12.000Z","dependencies_parsed_at":"2022-09-26T17:51:30.782Z","dependency_job_id":null,"html_url":"https://github.com/coryodaniel/k8s_conf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Fk8s_conf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Fk8s_conf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Fk8s_conf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Fk8s_conf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coryodaniel","download_url":"https://codeload.github.com/coryodaniel/k8s_conf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248085325,"owners_count":21045139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T18:45:06.396Z","updated_at":"2025-04-10T04:12:04.320Z","avatar_url":"https://github.com/coryodaniel.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# K8s.Conf\n\nK8s.Conf is **deprecated** and has been merged into [`k8s` elixir client](https://github.com/coryodaniel/k8s).\n\n[K8s.Conf](https://hexdocs.pm/k8s_conf/readme.html) parses Kubernetes config files and generates HTTP headers and options for authenticating to the Kubernetes API.\n\n[![Build Status](https://travis-ci.org/coryodaniel/k8s_conf.svg?branch=master)](https://travis-ci.org/coryodaniel/k8s_conf)\n[![Coverage Status](https://coveralls.io/repos/github/coryodaniel/k8s_conf/badge.svg?branch=master)](https://coveralls.io/github/coryodaniel/k8s_conf?branch=master)\n[![Hex.pm](http://img.shields.io/hexpm/v/k8s_conf.svg?style=flat)](https://hex.pm/packages/k8s_conf) \n[![Documentation](https://img.shields.io/badge/documentation-on%20hexdocs-green.svg)](https://hexdocs.pm/k8s_conf/)\n![Hex.pm](https://img.shields.io/hexpm/l/k8s_conf.svg?style=flat)\n\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `k8s_conf` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:k8s_conf, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at [https://hexdocs.pm/k8s_conf](https://hexdocs.pm/k8s_conf).\n\n## Usage\n\n```elixir\n# Defaults to 'current-context', optionally set cluster, context, or user\n# opts = [\n#   user: \"alt-user\",\n#   cluster: \"alt-cluster\",\n#   context: \"alt-context\"\n# ]\n\nopts = []\nconfig = K8s.Conf.from_file(\"~/.kube/config\", opts)\n\n# Optionally load from a service account\n# config = K8s.Conf.from_service_account()\n\nhttp_request_options = K8s.Conf.RequestOptions.generate(config)\n[header: headers, ssl_options: ssl_options] = http_request_options\n\n# Add headers and SSL options to HTTP library of choice\n```\n\n### Adding authorization providers\n\n```elixir\nconfig :k8s_conf, providers: [My.Custom.Provider]\n```\n\nProviders are checked in order, the first to return an authorization struct wins.\n\nCustom providers are processed before default providers.\n\nSee [Certicate](lib/k8s/conf/auth/certificate.ex) and [Token](lib/k8s/conf/auth/token.ex) for protocol and behavior implementations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoryodaniel%2Fk8s_conf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoryodaniel%2Fk8s_conf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoryodaniel%2Fk8s_conf/lists"}