Skip to content

Commit

Permalink
adding the missed part
Browse files Browse the repository at this point in the history
Signed-off-by: ntishchauhan0022 <[email protected]>
  • Loading branch information
nitishchauhan0022 committed Jun 12, 2023
1 parent 2bc28af commit 62cecfa
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pkg/k8s/serviceaccount.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package k8s

import (
"context"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

func GetServiceAccount(ctx context.Context, referencedServiceAccount, namespace string) error {
k8sClient, err := NewKubernetesClientset()
if err != nil {
return err
}
_,err = k8sClient.CoreV1().ServiceAccounts(namespace).Get(ctx, referencedServiceAccount, metav1.GetOptions{})
if err != nil {
return err
}
return nil
}

0 comments on commit 62cecfa

Please sign in to comment.