Documentation ¶
Overview ¶
Package agent builds manifests for creating a managed fleet-agent.
Index ¶
- Constants
- Variables
- func AgentWithConfig(ctx context.Context, agentNamespace, controllerNamespace, agentScope string, ...) ([]runtime.Object, error)
- func Manifest(namespace string, agentScope string, opts ManifestOptions) []runtime.Object
- func Resolve(global, prefix, image string) string
- type ConfigOptions
- type ManifestOptions
- type Options
Constants ¶
View Source
const (
DefaultName = "fleet-agent"
)
Variables ¶
View Source
var ( DebugEnabled bool DebugLevel = 0 )
Functions ¶
func AgentWithConfig ¶
func AgentWithConfig(ctx context.Context, agentNamespace, controllerNamespace, agentScope string, cg *client.Getter, tokenName string, opts *Options) ([]runtime.Object, error)
AgentWithConfig returns the agent manifest. It includes an updated agent token secret from the cluster. It finds or creates the agent config inside a configmap.
This is used when importing a cluster.
func Manifest ¶
func Manifest(namespace string, agentScope string, opts ManifestOptions) []runtime.Object
Manifest builds and returns a deployment manifest for the fleet-agent with a cluster role, two service accounts and a network policy
It allows the downstream agent to create any resource on its cluster.
This is called by both, import and manageagent.
Types ¶
type ConfigOptions ¶
type ManifestOptions ¶
type ManifestOptions struct { AgentEnvVars []corev1.EnvVar AgentImage string // DefaultAgentImage = "rancher/fleet-agent" + ":" + version.Version AgentImagePullPolicy string AgentTolerations []corev1.Toleration CheckinInterval string PrivateRepoURL string // PrivateRepoURL = registry.yourdomain.com:5000 SystemDefaultRegistry string AgentAffinity *corev1.Affinity AgentResources *corev1.ResourceRequirements HostNetwork bool }
type Options ¶
type Options struct { ManifestOptions ConfigOptions APIServerCA []byte APIServerURL string NoCA bool // unused }
Click to show internal directories.
Click to hide internal directories.