Added routes and methods to create admiralty resources : secrets, target sources

This commit is contained in:
pb
2025-02-25 13:03:52 +01:00
parent d26f0d6b1b
commit f60474681b
3 changed files with 474 additions and 9 deletions

View File

@@ -14,6 +14,10 @@ type Infrastructure interface {
CreateRoleBinding(ctx context.Context, ns string, roleBinding string, role string) error
CreateRole(ctx context.Context, ns string, role string, groups [][]string, resources [][]string, verbs [][]string) error
GetTargets(ctx context.Context) ([]string,error)
CreateAdmiraltySource(executionId string) ([]byte, error)
CreateKubeconfigSecret(kubeconfig string, executionId string) ([]byte, error)
GetKubeconfigSecret(executionId string) ([]byte, error)
CreateAdmiraltyTarget(executionId string)([]byte,error)
}
var _service = map[string]func() (Infrastructure, error){
@@ -27,3 +31,4 @@ func NewService() (Infrastructure, error) {
}
return service()
}