-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(self-monitoring): add support for self-monitoring
This commit lays the foundation for self-monitoring: 1. Add a cluster-scoped Dash0OperatorConfiguration CRD, which contains a default endpoint and authorization setting, which will be used for self-monitoring. 2. When self-monitoring is enabled in the Dash0OperatorConfiguration resource, the controller deployment and the collector daemonset are extended with environment variables like OTEL_EXPORTER_OTLP_ENDPOINT etc., based on the operator configuration resource export settings. 3. On removal of the Dash0OperatorConfiguration resource, the same environment variables are removed from the controller deployment and collector daemonset. 4. Add metrics and tracing to the filelogoffsetsynch container via the Go OTel SDK. Other collector containers and the operator controller process will be extended with the Go OTel SDK in a later iteration. 5. Add a new end-to-end test for self-monitoring telemetry.
- Loading branch information
Showing
69 changed files
with
4,925 additions
and
752 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// SPDX-FileCopyrightText: Copyright 2024 Dash0 Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package dash0monitoring | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
"k8s.io/apimachinery/pkg/types" | ||
ctrl "sigs.k8s.io/controller-runtime" | ||
"sigs.k8s.io/controller-runtime/pkg/client" | ||
) | ||
|
||
type Dash0Resource interface { | ||
GetResourceTypeName() string | ||
GetNaturalLanguageResourceTypeName() string | ||
Get() client.Object | ||
GetName() string | ||
GetUid() types.UID | ||
GetCreationTimestamp() metav1.Time | ||
GetReceiver() client.Object | ||
GetListReceiver() client.ObjectList | ||
IsClusterResource() bool | ||
RequestToName(ctrl.Request) string | ||
|
||
IsAvailable() bool | ||
SetAvailableConditionToUnknown() | ||
EnsureResourceIsMarkedAsAvailable() | ||
EnsureResourceIsMarkedAsDegraded(string, string) | ||
EnsureResourceIsMarkedAsAboutToBeDeleted() | ||
IsMarkedForDeletion() bool | ||
|
||
Items(client.ObjectList) []client.Object | ||
At(client.ObjectList, int) Dash0Resource | ||
} |
Oops, something went wrong.