node

package
v0.0.0-...-21cfbab Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0, Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Copyright (c) 2020 Tigera, Inc. All rights reserved.

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.

Copyright (c) 2021 Tigera, Inc. All rights reserved.

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.

Copyright (c) 2019 Tigera, Inc. All rights reserved.

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.

Copyright (c) 2017-2020 Tigera, Ic. All rights reserved.

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.

Copyright (c) 2017-2020 Tigera, Inc. All rights reserved.

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.

Index

Constants

View Source
const (
	RateLimitK8s          = "k8s"
	RateLimitCalicoCreate = "calico-create"
	RateLimitCalicoList   = "calico-list"
	RateLimitCalicoUpdate = "calico-update"
	RateLimitCalicoDelete = "calico-delete"
)

Variables

This section is empty.

Functions

func NewAutoHEPController

func NewAutoHEPController(c config.NodeControllerConfig, client client.Interface) *autoHostEndpointController

func NewIPAMController

func NewIPAMController(cfg config.NodeControllerConfig, c client.Interface, cs kubernetes.Interface, pi, ni cache.Indexer) *ipamController

func NewNodeController

func NewNodeController(ctx context.Context,
	k8sClientset *kubernetes.Clientset,
	calicoClient client.Interface,
	cfg config.NodeControllerConfig,
	nodeInformer, podInformer cache.SharedIndexInformer) controller.Controller

NewNodeController Constructor for NodeController

func NewNodeDeletionController

func NewNodeDeletionController(client client.Interface, cs *kubernetes.Clientset) *nodeDeleter

NewNodeDeletionController creates a new controller responsible for garbage collection Calico node objects in etcd mode when their corresponding Kubernetes node is deleted.

func NewNodeLabelController

func NewNodeLabelController(c client.Interface) *nodeLabelController

Types

type DataFeed

type DataFeed struct {
	// contains filtered or unexported fields
}

func NewDataFeed

func NewDataFeed(c client.Interface) *DataFeed

func (*DataFeed) OnStatusUpdated

func (d *DataFeed) OnStatusUpdated(status bapi.SyncStatus)

func (*DataFeed) OnUpdates

func (c *DataFeed) OnUpdates(updates []bapi.Update)

func (*DataFeed) RegisterForNotification

func (d *DataFeed) RegisterForNotification(key model.Key, h UpdateHandler)

RegisterForNotification registers a channel to receive an update when the given kind receives an update. kind should be a pointer to the struct type received over the syncer.

func (*DataFeed) RegisterForSyncStatus

func (d *DataFeed) RegisterForSyncStatus(h StatusHandler)

func (*DataFeed) Start

func (d *DataFeed) Start()

type ErrorNotKubernetes

type ErrorNotKubernetes struct {
	// contains filtered or unexported fields
}

func (*ErrorNotKubernetes) Error

func (e *ErrorNotKubernetes) Error() string

type FakeCalicoClient

type FakeCalicoClient struct {
	// contains filtered or unexported fields
}

FakeCalicoClient is a fake client for use in the IPAM tests.

func NewFakeCalicoClient

func NewFakeCalicoClient() *FakeCalicoClient

func (*FakeCalicoClient) BGPConfigurations

func (f *FakeCalicoClient) BGPConfigurations() clientv3.BGPConfigurationInterface

BGPConfigurations returns an interface for managing the BGP configuration resources.

func (*FakeCalicoClient) BGPFilter

BGPFilter returns an interface for managing BGPFilter resources.

func (*FakeCalicoClient) BGPPeers

BGPPeers returns an interface for managing BGP peer resources.

func (*FakeCalicoClient) Backend

func (f *FakeCalicoClient) Backend() bapi.Client

func (*FakeCalicoClient) BlockAffinities

func (f *FakeCalicoClient) BlockAffinities() clientv3.BlockAffinityInterface

func (*FakeCalicoClient) CalicoNodeStatus

func (f *FakeCalicoClient) CalicoNodeStatus() clientv3.CalicoNodeStatusInterface

func (*FakeCalicoClient) ClusterInformation

func (f *FakeCalicoClient) ClusterInformation() clientv3.ClusterInformationInterface

ClusterInformation returns an interface for managing the cluster information resource.

func (*FakeCalicoClient) EnsureInitialized

func (f *FakeCalicoClient) EnsureInitialized(ctx context.Context, calicoVersion string, clusterType string) error

EnsureInitialized is used to ensure the backend datastore is correctly initialized for use by Calico. This method may be called multiple times, and will have no effect if the datastore is already correctly initialized. Most Calico deployment scenarios will automatically implicitly invoke this method and so a general consumer of this API can assume that the datastore is already initialized.

func (*FakeCalicoClient) FelixConfigurations

func (f *FakeCalicoClient) FelixConfigurations() clientv3.FelixConfigurationInterface

FelixConfigurations returns an interface for managing the Felix configuration resources.

func (*FakeCalicoClient) GlobalNetworkPolicies

func (f *FakeCalicoClient) GlobalNetworkPolicies() clientv3.GlobalNetworkPolicyInterface

GlobalNetworkPolicies returns an interface for managing global network policy resources.

func (*FakeCalicoClient) GlobalNetworkSets

func (f *FakeCalicoClient) GlobalNetworkSets() clientv3.GlobalNetworkSetInterface

GlobalNetworkSets returns an interface for managing global network sets resources.

func (*FakeCalicoClient) HostEndpoints

func (f *FakeCalicoClient) HostEndpoints() clientv3.HostEndpointInterface

HostEndpoints returns an interface for managing host endpoint resources.

func (*FakeCalicoClient) IPAM

func (f *FakeCalicoClient) IPAM() ipam.Interface

IPAM returns an interface for managing IP address assignment and releasing.

func (*FakeCalicoClient) IPAMConfig

func (*FakeCalicoClient) IPPools

IPPools returns an interface for managing IP pool resources.

func (*FakeCalicoClient) IPReservations

func (f *FakeCalicoClient) IPReservations() clientv3.IPReservationInterface

func (*FakeCalicoClient) KubeControllersConfiguration

func (f *FakeCalicoClient) KubeControllersConfiguration() clientv3.KubeControllersConfigurationInterface

KubeControllersConfiguration returns an interface for managing the KubeControllersConfiguration resource.

func (*FakeCalicoClient) NetworkPolicies

func (f *FakeCalicoClient) NetworkPolicies() clientv3.NetworkPolicyInterface

NetworkPolicies returns an interface for managing namespaced network policy resources.

func (*FakeCalicoClient) NetworkSets

NetworkSets returns an interface for managing network sets resources.

func (*FakeCalicoClient) Nodes

Nodes returns an interface for managing node resources.

func (*FakeCalicoClient) Profiles

Profiles returns an interface for managing profile resources.

func (*FakeCalicoClient) WorkloadEndpoints

func (f *FakeCalicoClient) WorkloadEndpoints() clientv3.WorkloadEndpointInterface

WorkloadEndpoints returns an interface for managing workload endpoint resources.

type NodeController

type NodeController struct {
	// contains filtered or unexported fields
}

NodeController implements the Controller interface. It is responsible for monitoring kubernetes nodes and responding to delete events by removing them from the Calico datastore.

func (*NodeController) Run

func (c *NodeController) Run(stopCh chan struct{})

Run starts the node controller. It does start-of-day preparation and then launches worker threads.

type StatusHandler

type StatusHandler func(bapi.SyncStatus)

type UpdateHandler

type UpdateHandler func(bapi.Update)

Jump to

Keyboard shortcuts

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