activegate

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TenantSecretSuffix            = "-activegate-tenant-secret"
	TLSSecretSuffix               = "-activegate-tls-secret"
	ConnectionInfoConfigMapSuffix = "-activegate-connection-info"
	AuthTokenSecretSuffix         = "-activegate-authtoken-secret"
	DefaultImageRegistrySubPath   = "/linux/activegate"
)

Variables

View Source
var (
	RoutingCapability = Capability{
		DisplayName:  "routing",
		ArgumentName: "MSGrouter",
	}

	KubeMonCapability = Capability{
		DisplayName:  "kubernetes-monitoring",
		ArgumentName: "kubernetes_monitoring",
	}

	MetricsIngestCapability = Capability{
		DisplayName:  "metrics-ingest",
		ArgumentName: "metrics_ingest",
	}

	DynatraceAPICapability = Capability{
		DisplayName:  "dynatrace-api",
		ArgumentName: "restInterface",
	}
	DebuggingCapability = Capability{
		DisplayName:  "debugging",
		ArgumentName: "debugging",
	}
)
View Source
var CapabilityDisplayNames = map[CapabilityDisplayName]struct{}{
	RoutingCapability.DisplayName:       {},
	KubeMonCapability.DisplayName:       {},
	MetricsIngestCapability.DisplayName: {},
	DynatraceAPICapability.DisplayName:  {},
	DebuggingCapability.DisplayName:     {},
}

Functions

This section is empty.

Types

type ActiveGate

type ActiveGate struct {
	*Spec
	*Status
}

type Capability

type Capability struct {

	// The name of the capability known by the user, mainly used in the CR
	DisplayName CapabilityDisplayName

	// The string passed to the active gate image to enable a given capability
	ArgumentName string
}

type CapabilityDisplayName

type CapabilityDisplayName string

type CapabilityProperties

type CapabilityProperties struct {

	// Add a custom properties file by providing it as a value or reference it from a secret
	// +kubebuilder:validation:Optional
	// If referenced from a secret, make sure the key is called 'customProperties'
	CustomProperties *value.Source `json:"customProperties,omitempty"`

	// Node selector to control the selection of nodes
	// +kubebuilder:validation:Optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Node Selector",order=35,xDescriptors="urn:alm:descriptor:com.tectonic.ui:selector:Node"
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// Adds additional labels for the ActiveGate pods
	// +kubebuilder:validation:Optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Labels",order=37,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	Labels map[string]string `json:"labels,omitempty"`

	// Amount of replicas for your ActiveGates
	// +kubebuilder:validation:Optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Replicas",order=30,xDescriptors="urn:alm:descriptor:com.tectonic.ui:podCount"
	Replicas *int32 `json:"replicas,omitempty"`

	// The ActiveGate container image. Defaults to the latest ActiveGate image provided by the registry on the tenant
	// +kubebuilder:validation:Optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Image",order=10,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	Image string `json:"image,omitempty"`

	// Set activation group for ActiveGate
	// +kubebuilder:validation:Optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Activation group",order=31,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	Group string `json:"group,omitempty"`

	// Define resources requests and limits for single ActiveGate pods
	// +kubebuilder:validation:Optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Resource Requirements",order=34,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:resourceRequirements"}
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Set tolerations for the ActiveGate pods
	// +kubebuilder:validation:Optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Tolerations",order=36,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:hidden"}
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// List of environment variables to set for the ActiveGate
	// +kubebuilder:validation:Optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Environment variables",order=39,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:hidden"}
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Environment variables"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="urn:alm:descriptor:com.tectonic.ui:advanced,urn:alm:descriptor:com.tectonic.ui:text"
	Env []corev1.EnvVar `json:"env,omitempty"`

	// Adds TopologySpreadConstraints for the ActiveGate pods
	// +kubebuilder:validation:Optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="topologySpreadConstraints",order=40,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:hidden"}
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
}

CapabilityProperties is a struct which can be embedded by ActiveGate capabilities Such as KubernetesMonitoring or Routing It encapsulates common properties.

func (*CapabilityProperties) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapabilityProperties.

func (*CapabilityProperties) DeepCopyInto

func (in *CapabilityProperties) DeepCopyInto(out *CapabilityProperties)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Spec

type Spec struct {

	// Adds additional annotations to the ActiveGate pods
	// +kubebuilder:validation:Optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Annotations",order=27,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	Annotations map[string]string `json:"annotations,omitempty"`

	// Defines storage device
	// +kubebuilder:validation:Optional
	VolumeClaimTemplate *corev1.PersistentVolumeClaimSpec `json:"volumeClaimTemplate,omitempty"`

	// Configures the terminationGracePeriodSeconds parameter of the ActiveGate pod. Kubernetes defaults and rules apply.
	// +kubebuild:validation:Optional
	TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`

	// The name of a secret containing ActiveGate TLS cert+key and password. If not set, self-signed certificate is used.
	// server.p12: certificate+key pair in pkcs12 format
	// password: passphrase to read server.p12
	// +kubebuilder:validation:Optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="TLSSecretName",order=10,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	TLSSecretName string `json:"tlsSecretName,omitempty"`

	// Sets DNS Policy for the ActiveGate pods
	// +kubebuilder:validation:Optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="DNS Policy",order=24,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	DNSPolicy corev1.DNSPolicy `json:"dnsPolicy,omitempty"`

	// If specified, indicates the pod's priority. Name must be defined by creating a PriorityClass object with that
	// name. If not specified the setting will be removed from the StatefulSet.
	// +kubebuilder:validation:Optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Priority Class name",order=23,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:io.kubernetes:PriorityClass"}
	PriorityClassName string `json:"priorityClassName,omitempty"`

	CapabilityProperties `json:",inline"`

	// Activegate capabilities enabled (routing, kubernetes-monitoring, metrics-ingest, dynatrace-api)
	Capabilities []CapabilityDisplayName `json:"capabilities,omitempty"`

	// UseEphemeralVolume
	UseEphemeralVolume bool `json:"useEphemeralVolume,omitempty"`
	// contains filtered or unexported fields
}

func (*Spec) DeepCopy

func (in *Spec) DeepCopy() *Spec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Spec.

func (*Spec) DeepCopyInto

func (in *Spec) DeepCopyInto(out *Spec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Spec) GetAuthTokenSecretName

func (ag *Spec) GetAuthTokenSecretName() string

GetAuthTokenSecretName returns the name of the secret containing the ActiveGateAuthToken, which is mounted to the AGs.

func (*Spec) GetConnectionInfoConfigMapName

func (ag *Spec) GetConnectionInfoConfigMapName() string

func (*Spec) GetCustomImage

func (ag *Spec) GetCustomImage() string

CustomActiveGateImage provides the image reference for the ActiveGate provided in the Spec.

func (*Spec) GetDefaultImage

func (ag *Spec) GetDefaultImage(version string) string

GetDefaultImage provides the image reference for the ActiveGate from tenant registry. Format: repo:tag.

func (*Spec) GetReplicas

func (ag *Spec) GetReplicas() int32

func (*Spec) GetServiceAccountName

func (ag *Spec) GetServiceAccountName() string

func (*Spec) GetServiceAccountOwner

func (ag *Spec) GetServiceAccountOwner() string

func (*Spec) GetTLSSecretName

func (ag *Spec) GetTLSSecretName() string

GetTLSSecretName returns the name of the AG TLS secret.

func (*Spec) GetTenantSecretName

func (ag *Spec) GetTenantSecretName() string

GetTenantSecretName returns the name of the secret containing tenant UUID, token and communication endpoints for ActiveGate.

func (*Spec) GetTerminationGracePeriodSeconds

func (ag *Spec) GetTerminationGracePeriodSeconds() *int64

GetTerminationGracePeriodSeconds provides the configured value for the terminatGracePeriodSeconds parameter of the pod.

func (*Spec) HasCaCert

func (ag *Spec) HasCaCert() bool

func (*Spec) IsAPIEnabled added in v1.7.0

func (ag *Spec) IsAPIEnabled() bool

func (*Spec) IsAutomaticTLSSecretEnabled added in v1.7.0

func (ag *Spec) IsAutomaticTLSSecretEnabled() bool

func (*Spec) IsEnabled

func (ag *Spec) IsEnabled() bool

NeedsActiveGate returns true when a feature requires ActiveGate instances.

func (*Spec) IsKubernetesMonitoringEnabled

func (ag *Spec) IsKubernetesMonitoringEnabled() bool

func (*Spec) IsMetricsIngestEnabled

func (ag *Spec) IsMetricsIngestEnabled() bool

func (*Spec) IsMode

func (ag *Spec) IsMode(mode CapabilityDisplayName) bool

func (*Spec) IsRoutingEnabled

func (ag *Spec) IsRoutingEnabled() bool

func (*Spec) SetAPIURL added in v1.7.0

func (ag *Spec) SetAPIURL(apiURL string)

func (*Spec) SetAutomaticTLSCertificate

func (ag *Spec) SetAutomaticTLSCertificate(enabled bool)

func (*Spec) SetExtensionsDependency

func (ag *Spec) SetExtensionsDependency(isEnabled bool)

func (*Spec) SetName

func (ag *Spec) SetName(name string)

type Status

type Status struct {
	status.VersionStatus `json:",inline"`

	// Information about Active Gate's connections
	ConnectionInfo communication.ConnectionInfo `json:"connectionInfoStatus,omitempty"`

	// The ClusterIPs set by Kubernetes on the ActiveGate Service created by the Operator
	ServiceIPs []string `json:"serviceIPs,omitempty"`
}

+kubebuilder:object:generate=true

func (*Status) DeepCopy

func (in *Status) DeepCopy() *Status

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status.

func (*Status) DeepCopyInto

func (in *Status) DeepCopyInto(out *Status)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Status) GetImage

func (ag *Status) GetImage() string

Image provides the image reference set in Status for the ActiveGate. Format: repo@sha256:digest.

func (*Status) GetVersion

func (ag *Status) GetVersion() string

Version provides version set in Status for the ActiveGate.

Jump to

Keyboard shortcuts

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