Skip to content

Commit

Permalink
Merge pull request #132 from lsviben/stc-secret-ref
Browse files Browse the repository at this point in the history
feat: SharedTelemetryConfig secret references
  • Loading branch information
lsviben authored Dec 28, 2024
2 parents bc7b5a1 + 7b8bf84 commit b3d0ff5
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
19 changes: 19 additions & 0 deletions apis/observability/v1alpha1/telemetry_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,25 @@ type SharedTelemetryConfigSpec struct {
// the selected ControlPlanes.
// +kubebuilder:validation:Required
ExportPipeline Pipeline `json:"exportPipeline,omitempty"`

// ConfigPatchSecretRefs allows defining patches sourced from secrets to be
// applied to the telemetry configuration.
ConfigPatchSecretRefs []ConfigPatchSecretRef `json:"configPatchSecretRefs,omitempty"`
}

// ConfigPatchSecretRef defines a config patch sourced from a secret to be
// applied to the telemetry configuration.
type ConfigPatchSecretRef struct {
xpv1.LocalSecretReference `json:",inline"`
// Key in the secret from which to source the patch.
// +kubebuilder:validation:Required
Key string `json:"key"`
// Path to the field in the telemetry configuration to patch.
// Currently, we only support patching exporters, so the path
// needs to start with "exporters".
// +kubebuilder:validation:Required
// +kubebuilder:validation:XValidation:rule="self.startsWith('exporters.')",message="Only 'exporters' patching is supported, path must start with 'exporters.'"
Path string `json:"path"`
}

// Pipeline defines the telemetry exporter pipeline to configure on the
Expand Down
21 changes: 21 additions & 0 deletions apis/observability/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b3d0ff5

Please sign in to comment.