From 39505a797b77fdd2a2637fc420dbd667156d1567 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Mon, 18 Dec 2023 13:57:36 -0800 Subject: [PATCH] tier: Add validation to tier configuration --- cgroup/nolinux.go | 2 +- tier.go | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cgroup/nolinux.go b/cgroup/nolinux.go index 540f1d94..71e6fbfb 100644 --- a/cgroup/nolinux.go +++ b/cgroup/nolinux.go @@ -24,6 +24,6 @@ package cgroup import "errors" // GetMemoryLimit - Not implemented in non-linux platforms -func GetMemoryLimit(pid int) (limit uint64, err error) { +func GetMemoryLimit(_ int) (limit uint64, err error) { return limit, errors.New("Not implemented for non-linux platforms") } diff --git a/tier.go b/tier.go index a26315f3..f81df0df 100644 --- a/tier.go +++ b/tier.go @@ -111,8 +111,14 @@ func (adm *AdminClient) ListTiers(ctx context.Context) ([]*TierConfig, error) { type TierCreds struct { AccessKey string `json:"access,omitempty"` SecretKey string `json:"secret,omitempty"` + + AWSRole bool `json:"awsrole"` + AWSRoleWebIdentityTokenFile string `json:"awsroleWebIdentity,omitempty"` + AWSRoleARN string `json:"awsroleARN,omitempty"` + + AzSP ServicePrincipalAuth `json:"azSP,omitempty"` + CredsJSON []byte `json:"creds,omitempty"` - AWSRole bool `json:"awsrole"` } // EditTier supports updating credentials for the remote tier identified by tierName.