controllers

package
v1.0.10-0...-d82e8a0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: Apache-2.0 Imports: 62 Imported by: 0

Documentation

Overview

(c) Copyright IBM Corp. 2025

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.

(c) Copyright IBM Corp. 2025

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.

(c) Copyright IBM Corp. 2025

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

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

Add will create a new Instana Agent Controller and add this to the Manager for reconciling

func AddRemote

func AddRemote(mgr manager.Manager) error

Add will create a new Instana Agent Remote Controller and add this to the Manager for reconciling

func CreateDeploymentContext

func CreateDeploymentContext(
	ctx context.Context,
	c client.InstanaAgentClient,
	agent *instanav1.InstanaAgent,
	isOpenShift bool,
	logger logr.Logger,
	discoverETCD ETCDDiscoverFunc,
) (*k8ssensordeployment.DeploymentContext, error)

CreateDeploymentContext creates a deployment context for the k8s-sensor deployment. It handles both OpenShift and vanilla Kubernetes cases, setting up the appropriate ETCD configuration based on the environment.

Types

type DiscoveredETCDTargets

type DiscoveredETCDTargets struct {
	// Targets is a slice of ETCD endpoint URLs in the format scheme://ip:port/metrics
	// where scheme is either http or https. For example: "https://10.0.0.1:2379/metrics"
	Targets []string

	// CAFound indicates whether the etcd-ca secret was found in the agent's namespace,
	// which is needed for secure HTTPS connections to etcd endpoints
	CAFound bool
}

DiscoveredETCDTargets holds information about discovered ETCD endpoints

type ETCDDiscoverFunc

type ETCDDiscoverFunc func(ctx context.Context, agent *instanav1.InstanaAgent) (*DiscoveredETCDTargets, error)

ETCDDiscoverFunc is a function type for discovering ETCD endpoints

type InstanaAgentReconciler

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

func NewInstanaAgentReconciler

func NewInstanaAgentReconciler(
	client client.Client,
	scheme *runtime.Scheme,
	recorder record.EventRecorder,
) *InstanaAgentReconciler

NewInstanaAgentReconciler initializes a new InstanaAgentReconciler instance

func (*InstanaAgentReconciler) DiscoverETCDEndpoints

func (r *InstanaAgentReconciler) DiscoverETCDEndpoints(
	ctx context.Context,
	agent *instanav1.InstanaAgent,
) (*DiscoveredETCDTargets, error)

DiscoverETCDEndpoints attempts to discover ETCD endpoints in vanilla Kubernetes clusters.

func (*InstanaAgentReconciler) Reconcile

func (r *InstanaAgentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
	res ctrl.Result,
	reconcileErr error,
)

type InstanaAgentRemoteReconciler

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

func NewInstanaAgentRemoteReconciler

func NewInstanaAgentRemoteReconciler(
	client client.Client,
	scheme *runtime.Scheme,
	recorder record.EventRecorder,
) *InstanaAgentRemoteReconciler

NewInstanaAgentReconciler initializes a new InstanaAgentReconciler instance

func (*InstanaAgentRemoteReconciler) Reconcile

func (r *InstanaAgentRemoteReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
	res ctrl.Result,
	reconcileErr error,
)

Directories

Path Synopsis
reconciliation

Jump to

Keyboard shortcuts

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