From 69f43428cdedd28ae74a4e0c5206f9fe83a66904 Mon Sep 17 00:00:00 2001 From: Dasha Komsa Date: Tue, 14 Jan 2025 16:30:26 -0500 Subject: [PATCH] add ID field to KubernetesClusterUser response (#771) --- kubernetes.go | 1 + kubernetes_test.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/kubernetes.go b/kubernetes.go index 07842c7..8a4085a 100644 --- a/kubernetes.go +++ b/kubernetes.go @@ -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"` } diff --git a/kubernetes_test.go b/kubernetes_test.go index c23ba43..c8e7ffe 100644 --- a/kubernetes_test.go +++ b/kubernetes_test.go @@ -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", }, @@ -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"] } }`