Skip to content

Commit

Permalink
Merge pull request #94 from instana/otlp_settings_update
Browse files Browse the repository at this point in the history
Otlp settings update
  • Loading branch information
zach-robinson authored Jan 30, 2023
2 parents 449914b + 6a007d3 commit 0047855
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 3 deletions.
11 changes: 11 additions & 0 deletions api/v1/inline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,14 @@ type KubernetesDeploymentSpec struct {
// +kubebuilder:validation:Optional
Pod coreV1.ResourceRequirements `json:"pod,omitempty"`
}

type OpenTelemetry struct {
// Deprecated setting for backwards compatibility
Enabled `json:",inline"`

// +kubebuilder:validation:Optional
GRPC Enabled `json:"grpc,omitempty"`

// +kubebuilder:validation:Optional
HTTP Enabled `json:"http,omitempty"`
}
2 changes: 1 addition & 1 deletion api/v1/instanaagent_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type InstanaAgentSpec struct {

// Enables the OpenTelemetry gRPC endpoint on the Agent. If true, it will also apply `service.create: true`.
// +kubebuilder:validation:Optional
OpenTelemetry Enabled `json:"opentelemetry,omitempty"`
OpenTelemetry OpenTelemetry `json:"opentelemetry,omitempty"`

// Enables the Prometheus endpoint on the Agent. If true, it will also apply `service.create: true`.
// +kubebuilder:validation:Optional
Expand Down
4 changes: 2 additions & 2 deletions api/v1beta1/instanaagent_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (src *InstanaAgent) convertInternalSpecTo(dst *v1.InstanaAgent) {
}

dst.Spec.Rbac.Create = srcSpec.AgentRbacCreate
dst.Spec.OpenTelemetry.Enabled = srcSpec.OpenTelemetryEnabled
dst.Spec.OpenTelemetry.Enabled.Enabled = srcSpec.OpenTelemetryEnabled

dst.Spec.Agent.TlsSpec.SecretName = srcSpec.AgentTlsSecretName
dst.Spec.Agent.TlsSpec.Certificate = srcSpec.AgentTlsCertificate
Expand Down Expand Up @@ -175,7 +175,7 @@ func (dst *InstanaAgent) ConvertFrom(srcRaw conversion.Hub) error {
}

dst.Spec.AgentRbacCreate = src.Spec.Rbac.Create
dst.Spec.OpenTelemetryEnabled = src.Spec.OpenTelemetry.Enabled
dst.Spec.OpenTelemetryEnabled = src.Spec.OpenTelemetry.Enabled.Enabled

dst.Spec.AgentTlsSecretName = src.Spec.Agent.TlsSpec.SecretName
dst.Spec.AgentTlsCertificate = src.Spec.Agent.TlsSpec.Certificate
Expand Down
10 changes: 10 additions & 0 deletions bundle/manifests/instana.io_agents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1417,6 +1417,16 @@ spec:
properties:
enabled:
type: boolean
grpc:
properties:
enabled:
type: boolean
type: object
http:
properties:
enabled:
type: boolean
type: object
type: object
opentelemetry.enabled:
type: boolean
Expand Down
10 changes: 10 additions & 0 deletions config/crd/bases/instana.io_agents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,16 @@ spec:
properties:
enabled:
type: boolean
grpc:
properties:
enabled:
type: boolean
type: object
http:
properties:
enabled:
type: boolean
type: object
type: object
opentelemetry.enabled:
type: boolean
Expand Down

0 comments on commit 0047855

Please sign in to comment.