-
Notifications
You must be signed in to change notification settings - Fork 431
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
496 changed files
with
130,948 additions
and
1,357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"github.com/alauda/kube-ovn/pkg/speaker" | ||
"github.com/prometheus/client_golang/prometheus/promhttp" | ||
"k8s.io/klog" | ||
"k8s.io/sample-controller/pkg/signals" | ||
"net/http" | ||
) | ||
|
||
func main() { | ||
defer klog.Flush() | ||
config, err := speaker.ParseFlags() | ||
if err != nil { | ||
klog.Fatalf("failed to parse config %v", err) | ||
} | ||
|
||
stopCh := signals.SetupSignalHandler() | ||
ctl := speaker.NewController(config) | ||
|
||
go func() { | ||
http.Handle("/metrics", promhttp.Handler()) | ||
klog.Fatal(http.ListenAndServe(fmt.Sprintf("0.0.0.0:%d", config.PprofPort), nil)) | ||
}() | ||
|
||
ctl.Run(stopCh) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# BGP support | ||
|
||
Kube-OVN supports broadcast pod ips to external networks by BGP protocol. | ||
To enable BGP announce function, you need to install kube-ovn-speaker and annotate pods that need to be exposed. | ||
|
||
## Install kube-ovn-speaker | ||
|
||
1. Download `kube-ovn-speaker` yaml | ||
|
||
```bash | ||
wget https://github.com/alauda/kube-ovn/blob/master/yamls/speaker.yaml | ||
``` | ||
|
||
2. Modify the args in yaml | ||
|
||
```bash | ||
--neighbor-address=10.32.32.1 # The router address that need to establish bgp peers | ||
--neighbor-as=65030 # The AS of router | ||
--cluster-as=65000 # The AS of container network | ||
``` | ||
|
||
3. Apply the yaml | ||
|
||
```bash | ||
kubectl apply -f speaker.yaml | ||
``` | ||
|
||
## Annotate pods that need to be exposed | ||
|
||
```bash | ||
# Enable BGP | ||
kubectl annotate pod sample ovn.kubernetes.io/bgp=true | ||
|
||
# Disable BGP | ||
kubectl annotate pod perf-ovn-xzvd4 ovn.kubernetes.io/bgp- | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.