startup

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: 31 Imported by: 0

Documentation

Overview

Copyright (c) 2016,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.

Index

Constants

View Source
const (
	DEFAULT_IPV4_POOL_CIDR       = "192.168.0.0/16"
	DEFAULT_IPV4_POOL_BLOCK_SIZE = 26
	DEFAULT_IPV6_POOL_BLOCK_SIZE = 122
	DEFAULT_IPV4_POOL_NAME       = "default-ipv4-ippool"
	DEFAULT_IPV6_POOL_NAME       = "default-ipv6-ippool"

	DEFAULT_MONITOR_IP_POLL_INTERVAL = 60 * time.Second

	// KubeadmConfigConfigMap is defined in k8s.io/kubernetes, which we can't import due to versioning issues.
	KubeadmConfigConfigMap = "kubeadm-config"
	// Rancher clusters store their state in this config map in the kube-system namespace.
	RancherStateConfigMap = "full-cluster-state"

	OSTypeLinux   = "lin"
	OSTypeWindows = "win"
)

Variables

View Source
var VERSION string

Version string, set during build.

Functions

func ConfigureLogging

func ConfigureLogging()

func CreateOrUpdate

func CreateOrUpdate(ctx context.Context, client client.Interface, node *libapi.Node) (*libapi.Node, error)

CreateOrUpdate creates the Node if ResourceVersion is not specified, or Update if it's specified.

func GenerateIPv6ULAPrefix

func GenerateIPv6ULAPrefix() (string, error)

generateIPv6ULAPrefix return a random generated ULA IPv6 prefix as per RFC 4193. The pool is generated from bytes pulled from a secure random source.

func MonitorIPAddressSubnets

func MonitorIPAddressSubnets()

func Run

func Run()

This file contains the main startup processing for the calico/node. This includes:

  • Detecting IP address and Network to use for BGP
  • Configuring the node resource with IP/AS information provided in the environment, or autodetected.
  • Creating default IP Pools for quick-start use

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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