Documentation ¶
Overview ¶
+kubebuilder:object:generate=true +groupName=dynatrace.com +versionName=v1alpha2 +kubebuilder:validation:Optional
Index ¶
- Constants
- func SetupWebhookWithManager(mgr ctrl.Manager, validator admission.CustomValidator) error
- type EdgeConnect
- func (ec *EdgeConnect) ClientSecretName() string
- func (in *EdgeConnect) DeepCopy() *EdgeConnect
- func (in *EdgeConnect) DeepCopyInto(out *EdgeConnect)
- func (in *EdgeConnect) DeepCopyObject() runtime.Object
- func (edgeConnect *EdgeConnect) EmptyPullSecret() corev1.Secret
- func (ec *EdgeConnect) GetOAuthClientFromSecret(ctx context.Context, kubeReader client.Reader, secretName string) (OAuth, error)
- func (e *EdgeConnect) HostMappings() []HostMapping
- func (e *EdgeConnect) HostPatterns() []string
- func (*EdgeConnect) Hub()
- func (edgeConnect *EdgeConnect) Image() string
- func (edgeConnect *EdgeConnect) IsCustomImage() bool
- func (edgeConnect *EdgeConnect) IsK8SAutomationEnabled() bool
- func (edgeConnect *EdgeConnect) IsProvisionerModeEnabled() bool
- func (e *EdgeConnect) K8sAutomationHostPattern() string
- func (ec *EdgeConnect) ProxyAuth(ctx context.Context, kubeReader client.Reader) (string, string, error)
- func (ec *EdgeConnect) TrustedCAs(ctx context.Context, kubeReader client.Reader) ([]byte, error)
- type EdgeConnectList
- type EdgeConnectSpec
- type EdgeConnectStatus
- type HostMapping
- type ImageRefSpec
- type KubernetesAutomationSpec
- type OAuth
- type OAuthSpec
- type ProxySpec
Constants ¶
const ( ProxyAuthUserKey = "user" ProxyAuthPasswordKey = "password" )
const DefaultMinRequestThreshold = 15 * time.Minute
const (
KubernetesDefaultDNS = "kubernetes.default.svc.cluster.local"
)
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 )
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 { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Status EdgeConnectStatus `json:"status,omitempty"` Spec EdgeConnectSpec `json:"spec,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) 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 (*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) 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) TrustedCAs ¶
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) // +kubebuilder:default:=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 *ProxySpec `json:"proxy,omitempty"` // Overrides the default image ImageRef ImageRefSpec `json:"imageRef,omitempty"` // Location of the Dynatrace API to connect to, including your specific environment UUID // +kubebuilder:validation:Required ApiServer string `json:"apiServer"` // Restrict outgoing HTTP requests to your internal resources to specified hosts // +kubebuilder:example:="internal.example.org,*.dev.example.org" HostRestrictions []string `json:"hostRestrictions,omitempty"` // 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"` // ServiceAccountName that allows EdgeConnect to access the Kubernetes API // +kubebuilder:default:=dynatrace-edgeconnect ServiceAccountName string `json:"serviceAccountName,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"` // 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"` // Enables automatic restarts of EdgeConnect pods in case a new version is available (the default value is: true) // +kubebuilder:default:=true AutoUpdate bool `json:"autoUpdate"` }
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 ¶
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 ImageRefSpec ¶
type ImageRefSpec struct { // Custom EdgeConnect image repository // +kubebuilder:example:="docker.io/dynatrace/edgeconnect" Repository string `json:"repository,omitempty"` // Indicates version of the EdgeConnect image to use Tag string `json:"tag,omitempty"` }
func (*ImageRefSpec) DeepCopy ¶
func (in *ImageRefSpec) DeepCopy() *ImageRefSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRefSpec.
func (*ImageRefSpec) DeepCopyInto ¶
func (in *ImageRefSpec) DeepCopyInto(out *ImageRefSpec)
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 ¶
func (in *KubernetesAutomationSpec) DeepCopy() *KubernetesAutomationSpec
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 ¶
func (*OAuth) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuth.
func (*OAuth) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthSpec.
func (*OAuthSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProxySpec ¶
type ProxySpec struct { // Server address (hostname or IP address) of the proxy. Host string `json:"host,omitempty"` // NoProxy represents the NO_PROXY or no_proxy environment // variable. It specifies a string that contains comma-separated values // specifying hosts that should be excluded from proxying. NoProxy string `json:"noProxy,omitempty"` // Secret name which contains the username and password used for authentication with the proxy, using the // "Basic" HTTP authentication scheme. AuthRef string `json:"authRef,omitempty"` // Port of the proxy. Port uint32 `json:"port,omitempty"` }
func (*ProxySpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxySpec.
func (*ProxySpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.