Skip to content
This repository was archived by the owner on Oct 20, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ driver:
container into another network).
- IPv6 is not currently supported

## Configuring

To change the prefix used for the interface in containers that Docker runs, set the `CALICO_LIBNETWORK_IFPREFIX` environment variable.
* The default value is "cali"

## Troubleshooting

### Logging
Expand Down
13 changes: 11 additions & 2 deletions driver/package.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package driver

import "os"

const (
// Calico IPAM module does not allow selection of pools from which to allocate
// IP addresses. The pool ID, which has to be supplied in the libnetwork IPAM
Expand All @@ -9,6 +11,13 @@ const (
PoolIDV6 = "CalicoPoolIPv6"

CalicoGlobalAddressSpace = "CalicoGlobalAddressSpace"

IFPrefix = "cali"
)

var IFPrefix = "cali"

func init() {
if os.Getenv("CALICO_LIBNETWORK_IFPREFIX") != "" {
IFPrefix = os.Getenv("CALICO_LIBNETWORK_IFPREFIX")
}
}