Skip to content

Commit

Permalink
Merge pull request #22 from yahoo/clientgo
Browse files Browse the repository at this point in the history
zms lib update
  • Loading branch information
RuiGuo34 authored Feb 1, 2021
2 parents bcd94fc + d358d02 commit 8048d23
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
7 changes: 3 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ require (
github.com/kr/pretty v0.2.0 // indirect
github.com/mash/go-accesslog v1.2.0
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
github.com/pkg/errors v0.8.1
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.4.2
github.com/stretchr/testify v1.4.0
github.com/stretchr/testify v1.5.1
github.com/tevino/abool v0.0.0-20170917061928-9b9efcf221b5
github.com/yahoo/athenz v1.8.40
github.com/yahoo/athenz v1.9.30
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect
golang.org/x/sys v0.0.0-20191010194322-b09406accb47 // indirect
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0
k8s.io/api v0.15.10
Expand Down
3 changes: 2 additions & 1 deletion pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ func (c *Controller) sync(domain string) error {
// zmsGetSignedDomains - make http request to zms API to fetch domain data
func (c *Controller) zmsGetSignedDomains(domain string) (*zms.SignedDomains, bool, error) {
d := zms.DomainName(domain)
signedDomain, _, err := c.zmsClient.GetSignedDomains(d, "", "", "")
master := false
signedDomain, _, err := c.zmsClient.GetSignedDomains(d, "", "", &master, "")
if err != nil {
return nil, false, err
}
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ func getFakeDomain() zms.SignedDomain {
},
Services: []*zms.ServiceIdentity{},
Entities: []*zms.Entity{},
Groups: []*zms.Group{},
},
KeyId: "colo-env-1.1",
Signature: "signature",
Expand Down
3 changes: 2 additions & 1 deletion pkg/cron/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ func notifyOnErr(err error, backoffDelay time.Duration) {

// RequestCall - ZMS call for update crons
func (c *Cron) requestCall() error {
domains, etag, err := c.zmsClient.GetSignedDomains("", "true", "", c.etag)
master := false
domains, etag, err := c.zmsClient.GetSignedDomains("", "true", "", &master, c.etag)
if err != nil {
return fmt.Errorf("Error getting latest updated domains from ZMS API. Error: %v", err)
}
Expand Down

0 comments on commit 8048d23

Please sign in to comment.