Skip to content

Add option to specify a CA for the metal-apiserver endpoint - #79

Open
pormirza wants to merge 6 commits into
mainfrom
apiserver-ca
Open

pormirza wants to merge 6 commits into
mainfrom
apiserver-ca

Conversation

@pormirza

Copy link
Copy Markdown
Contributor

Adds 'api-ca' to allow additional CAs to be passed and trusted in addition to the system CAs

Used AI-Tools ✨

  • none used for generation

Closes #39

@pormirza
pormirza requested a review from a team as a code owner November 19, 2026 13:45
@pormirza
pormirza requested a review from Gerrit91 November 19, 2026 13:45
@pormirza
pormirza removed the request for review from Gerrit91 November 19, 2026 13:45
@pormirza
pormirza requested a review from Gerrit91 November 19, 2026 13:56
Comment thread cmd/root.go Outdated
}

mc, err := newApiClient(c.GetApiURL(), c.GetToken())
mc, err := newApiClient(c.GetApiURL(), c.GetToken(), c.GetApiCA())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe we should pass c in order not to grow the function params.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do you mean that newApiClient should take c and read the api url and ca from it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes!

Comment thread cmd/root.go
func newApiClient(apiURL, token string) (client.Client, error) {
func newApiClient(c *config.Config, token string) (client.Client, error) {
apiURL := c.GetApiURL()
apiCA := c.GetApiCA()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

GetToken() can also be called here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Add option to specify Certificate Authority for metal-apiserver endpoint

2 participants