Skip to content

Commit

Permalink
fix change repo name
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien BOUAT committed Feb 15, 2024
1 parent fb12445 commit 9673d13
Show file tree
Hide file tree
Showing 28 changed files with 55 additions and 53 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ test/
.env
neo4j/
vendor/
build/

# Editor directories and files
.idea
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM golang:latest as build
WORKDIR $GOPATH/src/github.com/ca-gip/kubi-members
COPY . $GOPATH/src/github.com/ca-gip/kubi-members
WORKDIR $GOPATH/src/github.com/ca-gip/kubi-members-v2
COPY . $GOPATH/src/github.com/ca-gip/kubi-members-v2
RUN make build

FROM scratch
WORKDIR /root/
COPY --from=build /go/src/github.com/ca-gip/kubi-members/build/kubi-members .
COPY --from=build /go/src/github.com/ca-gip/kubi-members-v2/build/kubi-members .
EXPOSE 8000
CMD ["./kubi-members"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: dependency codegen test build

REPO= github.com/ca-gip/kubi-members
REPO= github.com/ca-gip/kubi-members-v2
IMAGE= kubi-members
DOCKER_REPO= cagip

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/ca-gip/kubi-members
module github.com/ca-gip/kubi-members-v2

go 1.19

Expand Down
2 changes: 1 addition & 1 deletion hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(
# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
# instead of the $GOPATH directly. For normal projects this can be dropped.
bash "${CODEGEN_PKG}"/generate-groups.sh all \
github.com/ca-gip/kubi-members/pkg/generated github.com/ca-gip/kubi-members/pkg/apis \
github.com/ca-gip/kubi-members-v2/pkg/generated github.com/ca-gip/kubi-members-v2/pkg/apis \
cagip:v1 --go-header-file "${SCRIPT_ROOT}"/hack/boilerplate.go.txt
8 changes: 4 additions & 4 deletions internal/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"crypto/md5"
"fmt"

"github.com/ca-gip/kubi-members/internal/ldap"
"github.com/ca-gip/kubi-members/internal/utils"
v1 "github.com/ca-gip/kubi-members/pkg/apis/cagip/v1"
membersclientset "github.com/ca-gip/kubi-members/pkg/generated/clientset/versioned"
"github.com/ca-gip/kubi-members-v2/internal/ldap"
"github.com/ca-gip/kubi-members-v2/internal/utils"
v1 "github.com/ca-gip/kubi-members-v2/pkg/apis/cagip/v1"
membersclientset "github.com/ca-gip/kubi-members-v2/pkg/generated/clientset/versioned"
kubiv1 "github.com/ca-gip/kubi/pkg/apis/cagip/v1"
projectclientset "github.com/ca-gip/kubi/pkg/generated/clientset/versioned"
errors "k8s.io/apimachinery/pkg/api/errors"
Expand Down
13 changes: 7 additions & 6 deletions internal/ldap/ldap.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package ldap
import (
"crypto/tls"
"fmt"
"github.com/ca-gip/kubi-members/internal/utils"
"syscall"

"github.com/ca-gip/kubi-members-v2/internal/utils"
ldap "github.com/go-ldap/ldap/v3"
"k8s.io/klog/v2"
"syscall"
)

type User struct {
ID string `ldap:"id"`
ID string `ldap:"id"`
Dn string `ldap:"dn"`
Username string `ldap:"displayName"`
Mail string `ldap:"mail"`
Expand Down Expand Up @@ -47,7 +48,7 @@ func NewLdap() *Ldap {
"UserFilter", config.UserFilter,
"OpsGroupBase", config.OpsGroupBase,
"AppGroupBase", config.AppGroupBase,
"AdminGroupBase",config.AdminGroupBase,
"AdminGroupBase", config.AdminGroupBase,
"CustomerGroupBase", config.CustomerGroupBase,
"UserKey", config.UserKey)
tlsConfig := &tls.Config{
Expand Down Expand Up @@ -130,7 +131,7 @@ func (l *Ldap) searchUser(userDN string) (user *User, err error) {
TimeLimit: 10,
TypesOnly: false,
Filter: "(|(objectClass=person)(objectClass=organizationalPerson))",
Attributes: []string{"cn","mail",l.UserKey},
Attributes: []string{"cn", "mail", l.UserKey},
})

if err != nil || res == nil || len(res.Entries) == 0 {
Expand All @@ -140,7 +141,7 @@ func (l *Ldap) searchUser(userDN string) (user *User, err error) {
Dn: userDN,
Username: res.Entries[0].GetAttributeValue("cn"),
Mail: res.Entries[0].GetAttributeValue("mail"),
ID: res.Entries[0].GetAttributeValue(l.UserKey),
ID: res.Entries[0].GetAttributeValue(l.UserKey),
}
return
}
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"os"
"path/filepath"

"github.com/ca-gip/kubi-members/internal/controller"
"github.com/ca-gip/kubi-members/internal/ldap"
membersclientset "github.com/ca-gip/kubi-members/pkg/generated/clientset/versioned"
"github.com/ca-gip/kubi-members-v2/internal/controller"
"github.com/ca-gip/kubi-members-v2/internal/ldap"
membersclientset "github.com/ca-gip/kubi-members-v2/pkg/generated/clientset/versioned"
projectclientset "github.com/ca-gip/kubi/pkg/generated/clientset/versioned"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/cagip/v1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"

cagip "github.com/ca-gip/kubi-members/pkg/apis/cagip"
cagip "github.com/ca-gip/kubi-members-v2/pkg/apis/cagip"
)

// SchemeGroupVersion is group version used to register these objects
Expand Down
2 changes: 1 addition & 1 deletion pkg/generated/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/generated/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/generated/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/generated/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.

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/generated/informers/externalversions/cagip/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.

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

6 changes: 3 additions & 3 deletions pkg/generated/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/generated/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/generated/listers/cagip/v1/clustermember.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/generated/listers/cagip/v1/projectmember.go

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

0 comments on commit 9673d13

Please sign in to comment.