feat: accept Vault identity JWTs for writes, add set-environment route
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful

This commit is contained in:
2026-10-23 21:35:57 +11:00
parent 835e207c9b
commit 8c1bfda4c5
19 changed files with 724 additions and 38 deletions
+5
View File
@@ -169,6 +169,11 @@ func (c *Client) PutNode(ctx context.Context, n *models.Node) (*models.Node, err
var out models.Node
return &out, c.do(ctx, http.MethodPut, "/api/v1/nodes/"+url.PathEscape(n.Certname), n, &out)
}
func (c *Client) SetNodeEnvironment(ctx context.Context, certname, environment string) (*models.Node, error) {
var out models.Node
body := map[string]string{"environment": environment}
return &out, c.do(ctx, http.MethodPut, "/api/v1/nodes/"+url.PathEscape(certname)+"/environment", body, &out)
}
func (c *Client) DeleteNode(ctx context.Context, certname string) error {
return c.do(ctx, http.MethodDelete, "/api/v1/nodes/"+url.PathEscape(certname), nil, nil)
}