Skip to content

Commit

Permalink
Merge pull request #38 from UdayMadhav88/udaymothadaka-patch-1
Browse files Browse the repository at this point in the history
Updated go.mod file with necessary dependencies to improve functionality
  • Loading branch information
UdayMadhav88 authored Jun 10, 2024
2 parents c0386a4 + 0e5ef1b commit b8f1144
Show file tree
Hide file tree
Showing 37 changed files with 307 additions and 448 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/go-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Go Build
run-name: ${{ github.actor }} runs build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-k8s-athenz-syncer:
runs-on: ubuntu-latest
steps:
- name: Setup Go 1.22.x
uses: actions/setup-go@v5
with:
# Semantic version range syntax or exact version of Go
go-version: '1.22.x'
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- name: Run tests
run: go test -v -race ./...
- name: Print diff
run: diff -u <(echo -n) <(gofmt -d .) || true
- name: Go vet
run: go vet ./...
- name: Go build
run: go build -v -race ./...
- run: echo "🍏 This job's status is ${{ job.status }}."
72 changes: 56 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,24 +1,64 @@
module github.com/yahoo/k8s-athenz-syncer
module github.com/AthenZ/k8s-athenz-syncer

go 1.14
go 1.22.0

require (
github.com/AthenZ/athenz v1.11.59
github.com/ardielle/ardielle-go v1.5.2
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/fsnotify/fsnotify v1.4.9
github.com/google/go-cmp v0.4.0
github.com/imdario/mergo v0.3.7 // indirect
github.com/mash/go-accesslog v1.2.0
github.com/fsnotify/fsnotify v1.7.0
github.com/google/go-cmp v0.6.0
github.com/mash/go-accesslog v1.3.0
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.4.2
github.com/stretchr/testify v1.5.1
github.com/tevino/abool v0.0.0-20170917061928-9b9efcf221b5
github.com/yahoo/athenz v1.9.30
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0
k8s.io/api v0.19.15
k8s.io/apimachinery v0.19.15
k8s.io/client-go v0.19.15
k8s.io/klog/v2 v2.2.0 // indirect
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.9.0
github.com/tevino/abool v1.2.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
k8s.io/api v0.30.1
k8s.io/apimachinery v0.30.1
k8s.io/client-go v0.30.1
k8s.io/klog/v2 v2.120.1
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/go-jose/go-jose/v4 v4.0.2 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/oauth2 v0.19.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
442 changes: 117 additions & 325 deletions go.sum

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ import (
"syscall"
"time"

"github.com/yahoo/k8s-athenz-syncer/pkg/controller"
"github.com/yahoo/k8s-athenz-syncer/pkg/cron"
"github.com/yahoo/k8s-athenz-syncer/pkg/crypto"
"github.com/yahoo/k8s-athenz-syncer/pkg/identity"
"github.com/yahoo/k8s-athenz-syncer/pkg/util"
"github.com/AthenZ/k8s-athenz-syncer/pkg/controller"
"github.com/AthenZ/k8s-athenz-syncer/pkg/cron"
"github.com/AthenZ/k8s-athenz-syncer/pkg/crypto"
"github.com/AthenZ/k8s-athenz-syncer/pkg/identity"
"github.com/AthenZ/k8s-athenz-syncer/pkg/util"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"

"github.com/yahoo/athenz/clients/go/zms"
athenzClientset "github.com/yahoo/k8s-athenz-syncer/pkg/client/clientset/versioned"
"github.com/yahoo/k8s-athenz-syncer/pkg/log"
r "github.com/yahoo/k8s-athenz-syncer/pkg/reloader"
"github.com/AthenZ/athenz/clients/go/zms"
athenzClientset "github.com/AthenZ/k8s-athenz-syncer/pkg/client/clientset/versioned"
"github.com/AthenZ/k8s-athenz-syncer/pkg/log"
r "github.com/AthenZ/k8s-athenz-syncer/pkg/reloader"
"k8s.io/klog/v2"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/athenz/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package v1

import (
"github.com/mohae/deepcopy"
"github.com/yahoo/athenz/clients/go/zms"
"github.com/AthenZ/athenz/clients/go/zms"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand All @@ -39,7 +39,7 @@ type AthenzDomain struct {
Spec AthenzDomainSpec `json:"spec,omitempty"`
}

// AthenzDomainSpec contains the SignedDomain object https://github.com/yahoo/athenz/clients/go/zms
// AthenzDomainSpec contains the SignedDomain object https://github.com/AthenZ/athenz/clients/go/zms
type AthenzDomainSpec struct {
zms.SignedDomain `json:",inline"`
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/clientset/versioned/clientset.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pkg/client/clientset/versioned/fake/clientset_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/client/clientset/versioned/fake/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/client/clientset/versioned/scheme/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/client/informers/externalversions/athenz/interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pkg/client/informers/externalversions/factory.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/client/informers/externalversions/generic.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/client/listers/athenz/v1/athenzdomain.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"fmt"
"time"

"github.com/AthenZ/k8s-athenz-syncer/pkg/cr"
"github.com/AthenZ/k8s-athenz-syncer/pkg/log"
"github.com/ardielle/ardielle-go/rdl"
"github.com/yahoo/k8s-athenz-syncer/pkg/cr"
"github.com/yahoo/k8s-athenz-syncer/pkg/log"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/fields"

Expand All @@ -33,12 +33,12 @@ import (
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/util/workqueue"

"github.com/yahoo/athenz/clients/go/zms"
athenzClientset "github.com/yahoo/k8s-athenz-syncer/pkg/client/clientset/versioned"
athenzInformer "github.com/yahoo/k8s-athenz-syncer/pkg/client/informers/externalversions/athenz/v1"
"github.com/yahoo/k8s-athenz-syncer/pkg/cron"
"github.com/yahoo/k8s-athenz-syncer/pkg/ratelimiter"
"github.com/yahoo/k8s-athenz-syncer/pkg/util"
"github.com/AthenZ/athenz/clients/go/zms"
athenzClientset "github.com/AthenZ/k8s-athenz-syncer/pkg/client/clientset/versioned"
athenzInformer "github.com/AthenZ/k8s-athenz-syncer/pkg/client/informers/externalversions/athenz/v1"
"github.com/AthenZ/k8s-athenz-syncer/pkg/cron"
"github.com/AthenZ/k8s-athenz-syncer/pkg/ratelimiter"
"github.com/AthenZ/k8s-athenz-syncer/pkg/util"
)

const (
Expand Down Expand Up @@ -296,7 +296,8 @@ func (c *Controller) sync(domain string) error {
func (c *Controller) zmsGetSignedDomains(domain string) (*zms.SignedDomains, bool, error) {
d := zms.DomainName(domain)
master := false
signedDomain, _, err := c.zmsClient.GetSignedDomains(d, "", "", &master, "")
conditions := false
signedDomain, _, err := c.zmsClient.GetSignedDomains(d, "", "", &master, &conditions, "")
if err != nil {
return nil, false, err
}
Expand Down
10 changes: 5 additions & 5 deletions pkg/controller/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ import (
"testing"
"time"

"github.com/AthenZ/athenz/clients/go/zms"
athenz_domain "github.com/AthenZ/k8s-athenz-syncer/pkg/apis/athenz/v1"
"github.com/AthenZ/k8s-athenz-syncer/pkg/client/clientset/versioned/fake"
"github.com/AthenZ/k8s-athenz-syncer/pkg/cron"
"github.com/AthenZ/k8s-athenz-syncer/pkg/util"
"github.com/ardielle/ardielle-go/rdl"
"github.com/google/go-cmp/cmp"
"github.com/yahoo/athenz/clients/go/zms"
athenz_domain "github.com/yahoo/k8s-athenz-syncer/pkg/apis/athenz/v1"
"github.com/yahoo/k8s-athenz-syncer/pkg/client/clientset/versioned/fake"
"github.com/yahoo/k8s-athenz-syncer/pkg/cron"
"github.com/yahoo/k8s-athenz-syncer/pkg/util"
k8sfake "k8s.io/client-go/kubernetes/fake"
)

Expand Down
10 changes: 5 additions & 5 deletions pkg/cr/cr.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"reflect"
"time"

"github.com/yahoo/athenz/clients/go/zms"
athenz_domain "github.com/yahoo/k8s-athenz-syncer/pkg/apis/athenz/v1"
athenzClientset "github.com/yahoo/k8s-athenz-syncer/pkg/client/clientset/versioned"
athenzclient "github.com/yahoo/k8s-athenz-syncer/pkg/client/clientset/versioned/typed/athenz/v1"
"github.com/yahoo/k8s-athenz-syncer/pkg/log"
"github.com/AthenZ/athenz/clients/go/zms"
athenz_domain "github.com/AthenZ/k8s-athenz-syncer/pkg/apis/athenz/v1"
athenzClientset "github.com/AthenZ/k8s-athenz-syncer/pkg/client/clientset/versioned"
athenzclient "github.com/AthenZ/k8s-athenz-syncer/pkg/client/clientset/versioned/typed/athenz/v1"
"github.com/AthenZ/k8s-athenz-syncer/pkg/log"
apiError "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/tools/cache"
Expand Down
Loading

0 comments on commit b8f1144

Please sign in to comment.