edgeconnect

package
v1.4.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

+kubebuilder:object:generate=true +groupName=dynatrace.com +versionName=v1alpha2 +kubebuilder:validation:Optional

Index

Constants

View Source
const (
	ProxyAuthUserKey     = "user"
	ProxyAuthPasswordKey = "password"
)
View Source
const DefaultMinRequestThreshold = 15 * time.Minute
View Source
const (
	KubernetesDefaultDNS = "kubernetes.default.svc.cluster.local"
)
View Source
const (
	// MaxNameLength is the maximum length of a EdgeConnect's name, we tend to add suffixes to the name to avoid name collisions for resources related to the EdgeConnect.
	// The limit is necessary because kubernetes uses the name of some resources for the label value, which has a limit of 63 characters. (see https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set)
	MaxNameLength = 40
)
View Source
const TrustedCAKey = "certs"

Variables

This section is empty.

Functions

func SetupWebhookWithManager

func SetupWebhookWithManager(mgr ctrl.Manager, validator admission.CustomValidator) error

Types

type EdgeConnect

type EdgeConnect struct {
	Spec              EdgeConnectSpec `json:"spec,omitempty"`
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Status EdgeConnectStatus `json:"status,omitempty"`
}

EdgeConnect is the Schema for the EdgeConnect API +k8s:openapi-gen=true +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=edgeconnects,scope=Namespaced,categories=dynatrace,shortName={ec,ecs} +kubebuilder:printcolumn:name="ApiServer",type=string,JSONPath=`.spec.apiServer` +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.phase` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +kubebuilder:storageversion

func (*EdgeConnect) ClientSecretName

func (ec *EdgeConnect) ClientSecretName() string

func (*EdgeConnect) Conditions added in v1.4.0

func (ec *EdgeConnect) Conditions() *[]metav1.Condition

func (*EdgeConnect) DeepCopy

func (in *EdgeConnect) DeepCopy() *EdgeConnect

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

func (*EdgeConnect) DeepCopyInto

func (in *EdgeConnect) DeepCopyInto(out *EdgeConnect)

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

func (*EdgeConnect) DeepCopyObject

func (in *EdgeConnect) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*EdgeConnect) EmptyPullSecret

func (edgeConnect *EdgeConnect) EmptyPullSecret() corev1.Secret

func (*EdgeConnect) GetOAuthClientFromSecret

func (ec *EdgeConnect) GetOAuthClientFromSecret(ctx context.Context, kubeReader client.Reader, secretName string) (OAuth, error)

func (*EdgeConnect) GetServiceAccountName added in v1.4.0

func (edgeConnect *EdgeConnect) GetServiceAccountName() string

func (*EdgeConnect) HostMappings

func (e *EdgeConnect) HostMappings() []HostMapping

func (*EdgeConnect) HostPatterns

func (e *EdgeConnect) HostPatterns() []string

func (*EdgeConnect) Hub

func (*EdgeConnect) Hub()

Hub tags this version as the 'source' of the conversion for controller runtime.

func (*EdgeConnect) Image

func (edgeConnect *EdgeConnect) Image() string

func (*EdgeConnect) IsAutoUpdateEnabled added in v1.4.0

func (edgeConnect *EdgeConnect) IsAutoUpdateEnabled() bool

func (*EdgeConnect) IsCustomImage

func (edgeConnect *EdgeConnect) IsCustomImage() bool

func (*EdgeConnect) IsK8SAutomationEnabled

func (edgeConnect *EdgeConnect) IsK8SAutomationEnabled() bool

func (*EdgeConnect) IsProvisionerModeEnabled

func (edgeConnect *EdgeConnect) IsProvisionerModeEnabled() bool

func (*EdgeConnect) K8sAutomationHostPattern

func (e *EdgeConnect) K8sAutomationHostPattern() string

func (*EdgeConnect) ProxyAuth

func (ec *EdgeConnect) ProxyAuth(ctx context.Context, kubeReader client.Reader) (string, string, error)

func (*EdgeConnect) TrustedCAs

func (ec *EdgeConnect) TrustedCAs(ctx context.Context, kubeReader client.Reader) ([]byte, error)

type EdgeConnectList

type EdgeConnectList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []EdgeConnect `json:"items"`
}

EdgeConnectList contains a list of EdgeConnect +k8s:openapi-gen=true +kubebuilder:object:root=true

func (*EdgeConnectList) DeepCopy

func (in *EdgeConnectList) DeepCopy() *EdgeConnectList

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

func (*EdgeConnectList) DeepCopyInto

func (in *EdgeConnectList) DeepCopyInto(out *EdgeConnectList)

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

func (*EdgeConnectList) DeepCopyObject

func (in *EdgeConnectList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type EdgeConnectSpec

type EdgeConnectSpec struct {

	// Adds additional annotations to the EdgeConnect pods
	Annotations map[string]string `json:"annotations,omitempty"`

	// Adds additional labels to the EdgeConnect pods
	Labels map[string]string `json:"labels,omitempty"`

	// Amount of replicas for your EdgeConnect (the default value is: 1)
	Replicas *int32 `json:"replicas"`

	// Node selector to control the selection of nodes for the EdgeConnect pods
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// KubernetesAutomation enables Kubernetes Automation for Workflows
	KubernetesAutomation *KubernetesAutomationSpec `json:"kubernetesAutomation,omitempty"`

	// General configurations for proxy settings.
	// +kubebuilder:validation:Optional
	Proxy *proxy.Spec `json:"proxy,omitempty"`

	// ServiceAccountName that allows EdgeConnect to access the Kubernetes API
	ServiceAccountName *string `json:"serviceAccountName,omitempty"`

	// Enables automatic restarts of EdgeConnect pods in case a new version is available (the default value is: true)
	AutoUpdate *bool `json:"autoUpdate"`

	// Overrides the default image
	ImageRef image.Ref `json:"imageRef,omitempty"`

	// Location of the Dynatrace API to connect to, including your specific environment UUID
	// +kubebuilder:validation:Required
	ApiServer string `json:"apiServer"`

	// Pull secret for your private registry
	CustomPullSecret string `json:"customPullSecret,omitempty"`

	// Adds custom root certificate from a configmap. Put the certificate under certs within your configmap.
	// +kubebuilder:validation:Optional
	CaCertsRef string `json:"caCertsRef,omitempty"`

	// EdgeConnect uses the OAuth client to authenticate itself with the Dynatrace platform.
	// +kubebuilder:validation:Required
	OAuth OAuthSpec `json:"oauth"`

	// Defines resources requests and limits for single pods
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Restrict outgoing HTTP requests to your internal resources to specified hosts
	// +kubebuilder:example:="internal.example.org,*.dev.example.org"
	HostRestrictions []string `json:"hostRestrictions,omitempty"`

	// Adds additional environment variables to the EdgeConnect pods
	Env []corev1.EnvVar `json:"env,omitempty"`

	// Sets tolerations for the EdgeConnect pods
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// Sets topology spread constraints for the EdgeConnect pods
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`

	// Host patterns to be set in the tenant, only considered when provisioning is enabled.
	// +kubebuilder:validation:Optional
	HostPatterns []string `json:"hostPatterns,omitempty"`
}

EdgeConnectSpec defines the desired state of EdgeConnect.

func (*EdgeConnectSpec) DeepCopy

func (in *EdgeConnectSpec) DeepCopy() *EdgeConnectSpec

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

func (*EdgeConnectSpec) DeepCopyInto

func (in *EdgeConnectSpec) DeepCopyInto(out *EdgeConnectSpec)

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

type EdgeConnectStatus

type EdgeConnectStatus struct {
	// Defines the current state (Running, Updating, Error, ...)
	DeploymentPhase status.DeploymentPhase `json:"phase,omitempty"`

	// Version used for the Edgeconnect image
	Version status.VersionStatus `json:"version,omitempty"`

	// Indicates when the resource was last updated
	UpdatedTimestamp metav1.Time `json:"updatedTimestamp,omitempty"`

	// kube-system namespace uid
	KubeSystemUID string `json:"kubeSystemUID,omitempty"`

	// Conditions includes status about the current state of the instance
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

EdgeConnectStatus defines the observed state of EdgeConnect.

func (*EdgeConnectStatus) DeepCopy

func (in *EdgeConnectStatus) DeepCopy() *EdgeConnectStatus

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

func (*EdgeConnectStatus) DeepCopyInto

func (in *EdgeConnectStatus) DeepCopyInto(out *EdgeConnectStatus)

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

func (*EdgeConnectStatus) SetPhase

func (dk *EdgeConnectStatus) SetPhase(phase status.DeploymentPhase) bool

SetPhase sets the status phase on the EdgeConnect object.

type HostMapping

type HostMapping struct {
	From string `json:"from"`
	To   string `json:"to"`
}

func (*HostMapping) DeepCopy

func (in *HostMapping) DeepCopy() *HostMapping

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

func (*HostMapping) DeepCopyInto

func (in *HostMapping) DeepCopyInto(out *HostMapping)

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

type KubernetesAutomationSpec

type KubernetesAutomationSpec struct {
	// Enables Kubernetes Automation for Workflows
	Enabled bool `json:"enabled,omitempty"`
}

func (*KubernetesAutomationSpec) DeepCopy

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

func (*KubernetesAutomationSpec) DeepCopyInto

func (in *KubernetesAutomationSpec) DeepCopyInto(out *KubernetesAutomationSpec)

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

type OAuth

type OAuth struct {
	ClientID     string
	ClientSecret string
	Resource     string
}

func (*OAuth) DeepCopy

func (in *OAuth) DeepCopy() *OAuth

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

func (*OAuth) DeepCopyInto

func (in *OAuth) DeepCopyInto(out *OAuth)

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

type OAuthSpec

type OAuthSpec struct {
	// Name of the secret that holds oauth clientId/secret
	// +kubebuilder:validation:Required
	ClientSecret string `json:"clientSecret"`
	// Token endpoint URL of Dynatrace SSO
	// +kubebuilder:validation:Required
	Endpoint string `json:"endpoint"`
	// URN identifying your account. You get the URN when creating the OAuth client
	// +kubebuilder:validation:Required
	Resource string `json:"resource"`
	// Determines if the operator will create the EdgeConnect and light OAuth client on the cluster using the credentials provided. Requires more scopes than default behavior.
	// +kubebuilder:validation:Optional
	Provisioner bool `json:"provisioner"`
}

func (*OAuthSpec) DeepCopy

func (in *OAuthSpec) DeepCopy() *OAuthSpec

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

func (*OAuthSpec) DeepCopyInto

func (in *OAuthSpec) DeepCopyInto(out *OAuthSpec)

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

Jump to

Keyboard shortcuts

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