Skip to content

Commit

Permalink
add ID field to KubernetesClusterUser response (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-honeybadger authored Jan 14, 2025
1 parent 4a45b95 commit 69f4342
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ func (kc KubernetesCluster) URN() string {

// KubernetesClusterUser represents a Kubernetes cluster user.
type KubernetesClusterUser struct {
ID string `json:"id,omitempty"`
Username string `json:"username,omitempty"`
Groups []string `json:"groups,omitempty"`
}
Expand Down
2 changes: 2 additions & 0 deletions kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ func TestKubernetesClusters_GetUser(t *testing.T) {
kubeSvc := client.Kubernetes
want := &KubernetesClusterUser{
Username: "foo@example.com",
ID: "deadbeef-dead-beef-dead-deadbeef05e8",
Groups: []string{
"foo:bar",
},
Expand All @@ -392,6 +393,7 @@ func TestKubernetesClusters_GetUser(t *testing.T) {
{
"kubernetes_cluster_user": {
"username": "foo@example.com",
"id": "deadbeef-dead-beef-dead-deadbeef05e8",
"groups": ["foo:bar"]
}
}`
Expand Down

0 comments on commit 69f4342

Please sign in to comment.