Documentation ¶
Overview ¶
Package config implements the config for the fleet manager and agent
Index ¶
- Constants
- Variables
- func Exists(_ context.Context, namespace, name string, configMaps corev1.ConfigMapClient) (bool, error)
- func OnChange(ctx context.Context, f func(*Config) error)
- func Set(cfg *Config) error
- func ToConfigMap(namespace, name string, cfg *Config) (*v1.ConfigMap, error)
- type Bootstrap
- type Config
Constants ¶
View Source
const ( ManagerConfigName = "fleet-controller" AgentConfigName = "fleet-agent" AgentBootstrapConfigName = "fleet-agent-bootstrap" Key = "config" // DefaultNamespace is the default for the system namespace, which // contains the manager and agent DefaultNamespace = "cattle-fleet-system" LegacyDefaultNamespace = "fleet-system" )
Variables ¶
View Source
var ( DefaultManagerImage = "rancher/fleet" + ":" + version.Version DefaultAgentImage = "rancher/fleet-agent" + ":" + version.Version )
Functions ¶
Types ¶
type Bootstrap ¶ added in v0.3.0
type Bootstrap struct { Namespace string `json:"namespace,omitempty"` AgentNamespace string `json:"agentNamespace,omitempty"` // Repo to add at install time that will deploy to the local cluster. This allows // one to fully bootstrap fleet, its configuration and all its downstream clusters // in one shot. Repo string `json:"repo,omitempty"` Secret string `json:"secret,omitempty"` // gitrepo.ClientSecretName for agent from repo Paths string `json:"paths,omitempty"` Branch string `json:"branch,omitempty"` }
type Config ¶
type Config struct { // AgentImage defaults to rancher/fleet-agent:version if empty, can include a prefixed SystemDefaultRegistry AgentImage string `json:"agentImage,omitempty"` AgentImagePullPolicy string `json:"agentImagePullPolicy,omitempty"` // SystemDefaultRegistry used by Rancher when constructing the // agentImage string, it's in the config so fleet can remove it if a // private repo url prefix is specified on the agent's cluster resource SystemDefaultRegistry string `json:"systemDefaultRegistry,omitempty"` // AgentCheckinInterval determines how often agents update their clusters status, defaults to 15m AgentCheckinInterval metav1.Duration `json:"agentCheckinInterval,omitempty"` // ManageAgent if present and set to false, no bundles will be created to manage agents ManageAgent *bool `json:"manageAgent,omitempty"` Labels map[string]string `json:"labels,omitempty"` ClientID string `json:"clientID,omitempty"` APIServerURL string `json:"apiServerURL,omitempty"` APIServerCA []byte `json:"apiServerCA,omitempty"` Bootstrap Bootstrap `json:"bootstrap,omitempty"` IgnoreClusterRegistrationLabels bool `json:"ignoreClusterRegistrationLabels,omitempty"` }
func DefaultConfig ¶
func DefaultConfig() *Config
Click to show internal directories.
Click to hide internal directories.