Skip to content

Commit

Permalink
*: migrate openshift assets to new etcd org
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
  • Loading branch information
hexfusion committed Apr 7, 2020
1 parent 109b974 commit e065378
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions Dockerfile.openshift
@@ -1,6 +1,6 @@
FROM registry.svc.ci.openshift.org/openshift/release:golang-1.12 AS builder

WORKDIR /go/src/github.com/coreos/etcd
WORKDIR /go/src/go.etcd.io/etcd

COPY . .

Expand All @@ -11,9 +11,9 @@ FROM registry.svc.ci.openshift.org/openshift/origin-v4.0:base

ENTRYPOINT ["/usr/bin/etcd"]

COPY --from=builder /go/src/github.com/coreos/etcd/bin/etcd /usr/bin/
COPY --from=builder /go/src/github.com/coreos/etcd/bin/etcdctl /usr/bin/
COPY --from=builder /go/src/github.com/coreos/etcd/bin/discover-etcd-initial-cluster /usr/bin/
COPY --from=builder /go/src/go.etcd.io/etcd/bin/etcd /usr/bin/
COPY --from=builder /go/src/go.etcd.io/etcd/bin/etcdctl /usr/bin/
COPY --from=builder /go/src/go.etcd.io/etcd/bin/discover-etcd-initial-cluster /usr/bin/

LABEL io.k8s.display-name="etcd server" \
io.k8s.description="etcd is a distributed key-value store which stores the persistent master state for Kubernetes and OpenShift." \
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.rhel
@@ -1,6 +1,6 @@
FROM openshift/golang-builder:1.12 AS builder

WORKDIR /go/src/github.com/coreos/etcd
WORKDIR /go/src/go.etcd.io/etcd

COPY . .

Expand All @@ -11,9 +11,9 @@ FROM openshift/origin-base

ENTRYPOINT ["/usr/bin/etcd"]

COPY --from=builder /go/src/github.com/coreos/etcd/bin/etcd /usr/bin/
COPY --from=builder /go/src/github.com/coreos/etcd/bin/etcdctl /usr/bin/
COPY --from=builder /go/src/github.com/coreos/etcd/bin/discover-etcd-initial-cluster /usr/bin/
COPY --from=builder /go/src/go.etcd.io/etcd/bin/etcd /usr/bin/
COPY --from=builder /go/src/go.etcd.io/etcd/bin/etcdctl /usr/bin/
COPY --from=builder /go/src/go.etcd.io/etcd/bin/discover-etcd-initial-cluster /usr/bin/

LABEL io.k8s.display-name="etcd server" \
io.k8s.description="etcd is a distributed key-value store which stores the persistent master state for Kubernetes and OpenShift." \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -12,7 +12,7 @@

.PHONY: build
build:
GO_BUILD_FLAGS="-v" ./build
GO111MODULE=on GO_BUILD_FLAGS="-v -mod vendor" ./build
./bin/etcd --version
./bin/etcdctl version

Expand Down
2 changes: 1 addition & 1 deletion build
Expand Up @@ -75,7 +75,7 @@ openshift_tools_build() {
CGO_ENABLED=0 go build $GO_BUILD_FLAGS \
-installsuffix cgo \
-ldflags "$GO_LDFLAGS" \
-o "${out}/discover-etcd-initial-cluster" "github.com/coreos/etcd/openshift-tools/discover-etcd-initial-cluster" || return
-o "${out}/discover-etcd-initial-cluster" "go.etcd.io/etcd/openshift-tools/discover-etcd-initial-cluster" || return
}

tools_build() {
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Expand Up @@ -48,3 +48,5 @@ require (
gopkg.in/yaml.v2 v2.2.2
sigs.k8s.io/yaml v1.1.0
)

go 1.13
2 changes: 1 addition & 1 deletion openshift-tools/discover-etcd-initial-cluster/main.go
Expand Up @@ -8,8 +8,8 @@ import (
"strings"
"time"

discover_etcd_initial_cluster "github.com/coreos/etcd/openshift-tools/pkg/discover-etcd-initial-cluster"
"github.com/spf13/pflag"
discover_etcd_initial_cluster "go.etcd.io/etcd/openshift-tools/pkg/discover-etcd-initial-cluster"
)

// copy from `utilflag "k8s.io/component-base/cli/flag"`
Expand Down
Expand Up @@ -8,16 +8,14 @@ import (
"strings"
"time"

"github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/spf13/cobra"
"github.com/spf13/pflag"

"github.com/coreos/etcd/pkg/transport"
"google.golang.org/grpc"

"github.com/coreos/etcd/clientv3"

"github.com/spf13/pflag"

"github.com/spf13/cobra"
"go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/etcdserver/etcdserverpb"
"go.etcd.io/etcd/pkg/transport"
)

type DiscoverEtcdInitialClusterOptions struct {
Expand Down Expand Up @@ -195,7 +193,7 @@ func (o *DiscoverEtcdInitialClusterOptions) Run() error {
if len(member.Name) == 0 { // this is the signal for whether or not a given peer is started
continue
}
for _, peerURL := range member.PeerURLs{
for _, peerURL := range member.PeerURLs {
etcdInitialClusterEntries = append(etcdInitialClusterEntries, fmt.Sprintf("%s=%s", member.Name, peerURL))
}
}
Expand Down

0 comments on commit e065378

Please sign in to comment.