rancher-flat-network

command module
v0.1.0-beta.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

README

rancher-flat-network

CI Go Report Card GitHub release GitHub pre-release License

Rancher Flat-Network Operator (based on Wrangler V2) & CNI plugin for managing pods using the flat-networks (Macvlan/IPvlan).

Current Progress

Operator

  • FlatNetwork subnet IPAM supports for both Macvlan & IPvlan.
  • Support for both IPv4 and IPv6 addresses.
  • IPAM supports custom specified IP address or allocate IP address automatically.
  • Custom IP Range to allocate IP address.
  • Auto create FlatNetwork headless ClusterIP service.
  • Leader election support to run operator & webhook server in multi-replicas (HA).
  • Update FlatNetwork Service Endpoints IP address.
  • Admission webhook server.

CNI

  • Macvlan & IPvlan support.
  • CNI Spec 1.0.0 support.

Migrator

  • Upgrade resource migrator from macvlan.cluster.cattle.io to flatnetwork.pandaria.io.

Usage

Operator

To build and run this flat-network operator manually:

  1. Prepare a clean Kubernetes cluster for testing purpose.

  2. Apply CRDs.

    $ kubectl apply -f ./charts/rancher-flat-network/templates/crd.yaml
    
  3. Build and run flat-network operator.

    $ go build . && ./rancher-flat-network-operator --webhook-server=false
    
  4. Example workloads are available in docs directory, run following command to create example subnet & workloads for test.

    $ kubectl apply -f ./docs/macvlan
    $ kubectl apply -f ./docs/ipvlan
    

Environment variables for operator:

  • CATTLE_DEV_MODE: Enable debug outputs and extend the leader election renew deadline & lease duration to support delve breakpoint debug operations, default false.
  • CATTLE_RESYNC_DEFAULT: period to resync resources in minutes, default 600min (10h).
  • CATTLE_ELECTION_LEASE_DURATION: leader election lease duration, default 45s.
  • CATTLE_ELECTION_RENEW_DEADLINE: leader election renew deadline, default 30s.
  • CATTLE_ELECTION_RETRY_PERIOD: leader election retry period, default 2s.
  • FLAT_NETWORK_CNI_ARP_POLICY: CNI ARP Policy, default arp_notify, available arp_notify, arping.
  • FLAT_NETWORK_CLUSTER_CIDR: Kubernetes config Cluster CIDR, default 10.42.0.0/16.
  • FLAT_NETWORK_SERVICE_CIDR: Kubernetes config Service CIDR, default 10.43.0.0/16.

License

Copyright 2024 SUSE Rancher

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
apis/flatnetwork.pandaria.io/v1
+k8s:deepcopy-gen=package +groupName=flatnetwork.pandaria.io
+k8s:deepcopy-gen=package +groupName=flatnetwork.pandaria.io
generated/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
generated/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
generated/clientset/versioned/typed/flatnetwork.pandaria.io/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
generated/clientset/versioned/typed/flatnetwork.pandaria.io/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL