Skip to content

Commit

Permalink
modify webhook img to independent image (#1442)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongzhen-ma committed Apr 14, 2022
1 parent e1d6dbf commit 9bec51b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.DS_Store
dist/images/kube-ovn
dist/images/kube-ovn-cmd
dist/images/kube-ovn-webhook
test/e2e/ovnnb_db.*
test/e2e/ovnsb_db.*
kube-ovn.yaml
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ build-go:
go mod tidy
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -buildmode=pie -o $(CURDIR)/dist/images/kube-ovn -ldflags $(GOLDFLAGS) -v ./cmd/cni
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -buildmode=pie -o $(CURDIR)/dist/images/kube-ovn-cmd -ldflags $(GOLDFLAGS) -v ./cmd
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -buildmode=pie -o $(CURDIR)/dist/images/kube-ovn-webhook -ldflags $(GOLDFLAGS) -v ./cmd/webhook

.PHONY: build-go-arm
build-go-arm:
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -buildmode=pie -o $(CURDIR)/dist/images/kube-ovn -ldflags $(GOLDFLAGS) -v ./cmd/cni
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -buildmode=pie -o $(CURDIR)/dist/images/kube-ovn-cmd -ldflags $(GOLDFLAGS) -v ./cmd
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -buildmode=pie -o $(CURDIR)/dist/images/kube-ovn-webhook -ldflags $(GOLDFLAGS) -v ./cmd/webhook

.PHONY: build-bin
build-bin:
Expand Down
4 changes: 0 additions & 4 deletions cmd/cmdmain.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/kubeovn/kube-ovn/cmd/ovn_monitor"
"github.com/kubeovn/kube-ovn/cmd/pinger"
"github.com/kubeovn/kube-ovn/cmd/speaker"
"github.com/kubeovn/kube-ovn/cmd/webhook"
)

const (
Expand All @@ -21,7 +20,6 @@ const (
CmdMonitor = "kube-ovn-monitor"
CmdPinger = "kube-ovn-pinger"
CmdSpeaker = "kube-ovn-speaker"
CmdWebHook = "kube-ovn-webhook"
CmdControllerHealthCheck = "kube-ovn-controller-healthcheck"
)

Expand All @@ -39,8 +37,6 @@ func main() {
pinger.CmdMain()
case CmdSpeaker:
speaker.CmdMain()
case CmdWebHook:
webhook.CmdMain()
case CmdControllerHealthCheck:
controller_health_check.CmdMain()
default:
Expand Down
4 changes: 2 additions & 2 deletions cmd/webhook/server.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package webhook
package main

import (
"flag"
Expand Down Expand Up @@ -37,7 +37,7 @@ func init() {
}
}

func CmdMain() {
func main() {
var port int
klog.Infof(versions.String())

Expand Down
2 changes: 1 addition & 1 deletion dist/images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ WORKDIR /kube-ovn

COPY kube-ovn /kube-ovn/kube-ovn
COPY kube-ovn-cmd /kube-ovn/kube-ovn-cmd
COPY kube-ovn-webhook /kube-ovn/kube-ovn-webhook
RUN ln -s /kube-ovn/kube-ovn-cmd /kube-ovn/kube-ovn-controller && \
ln -s /kube-ovn/kube-ovn-cmd /kube-ovn/kube-ovn-daemon && \
ln -s /kube-ovn/kube-ovn-cmd /kube-ovn/kube-ovn-monitor && \
ln -s /kube-ovn/kube-ovn-cmd /kube-ovn/kube-ovn-pinger && \
ln -s /kube-ovn/kube-ovn-cmd /kube-ovn/kube-ovn-speaker && \
ln -s /kube-ovn/kube-ovn-cmd /kube-ovn/kube-ovn-webhook && \
ln -s /kube-ovn/kube-ovn-cmd /kube-ovn/kube-ovn-controller-healthcheck

0 comments on commit 9bec51b

Please sign in to comment.