Skip to content

Commit

Permalink
Allow hostport setting (#1280)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaronoff97 authored Jul 26, 2024
1 parent 70552fd commit 6676cdb
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/opentelemetry-kube-stack/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opentelemetry-kube-stack
version: 0.0.11
version: 0.0.12
description: |
OpenTelemetry Quickstart chart for Kubernetes.
Installs an operator and collector for an easy way to get started with Kubernetes observability.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: OpAMPBridge
metadata:
name: example
labels:
helm.sh/chart: opentelemetry-kube-stack-0.0.11
helm.sh/chart: opentelemetry-kube-stack-0.0.12
app.kubernetes.io/version: "0.103.0"
app.kubernetes.io/managed-by: Helm
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: example-cluster-stats
namespace: default
labels:
helm.sh/chart: opentelemetry-kube-stack-0.0.11
helm.sh/chart: opentelemetry-kube-stack-0.0.12
app.kubernetes.io/version: "0.103.0"
app.kubernetes.io/managed-by: Helm
opentelemetry.io/opamp-reporting: "true"
Expand Down Expand Up @@ -189,7 +189,7 @@ metadata:
name: example-daemon
namespace: default
labels:
helm.sh/chart: opentelemetry-kube-stack-0.0.11
helm.sh/chart: opentelemetry-kube-stack-0.0.12
app.kubernetes.io/version: "0.103.0"
app.kubernetes.io/managed-by: Helm
opentelemetry.io/opamp-reporting: "true"
Expand Down Expand Up @@ -614,6 +614,12 @@ spec:
mountPath: /hostfs
readOnly: true
mountPropagation: HostToContainer
ports:
- appProtocol: grpc
hostPort: 4317
name: otlp-grpc
port: 4317
protocol: TCP
env:
- name: OTEL_K8S_NODE_NAME
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Instrumentation
metadata:
name: example
labels:
helm.sh/chart: opentelemetry-kube-stack-0.0.11
helm.sh/chart: opentelemetry-kube-stack-0.0.12
app.kubernetes.io/version: "0.103.0"
app.kubernetes.io/managed-by: Helm
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ opentelemetry-operator:
enabled: true
collectors:
daemon:
ports:
- appProtocol: grpc
name: otlp-grpc
port: 4317
protocol: TCP
hostPort: 4317 # Force the hostPort
args:
# We need this for now until 0.105.0 is out with this fix:
# https://github.com/open-telemetry/opentelemetry-collector/commit/637b1f42fcb7cbb7ef8a50dcf41d0a089623a8b7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: example-daemon
namespace: default
labels:
helm.sh/chart: opentelemetry-kube-stack-0.0.11
helm.sh/chart: opentelemetry-kube-stack-0.0.12
app.kubernetes.io/version: "0.103.0"
app.kubernetes.io/managed-by: Helm
spec:
Expand Down
30 changes: 29 additions & 1 deletion charts/opentelemetry-kube-stack/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@
},
"ports": {
"items": {
"$ref": "#/$defs/ServicePort"
"$ref": "#/$defs/PortsSpec"
},
"type": "array"
},
Expand Down Expand Up @@ -2404,6 +2404,34 @@
"type": "object",
"required": ["path"]
},
"PortsSpec": {
"properties": {
"name": {
"type": "string"
},
"protocol": {
"type": "string"
},
"appProtocol": {
"type": "string"
},
"port": {
"type": "integer"
},
"targetPort": {
"type": ["string", "integer"]
},
"hostPort": {
"type": "integer"
},
"nodePort": {
"type": "integer"
}
},
"additionalProperties": false,
"type": "object",
"required": ["port"]
},
"ServicePort": {
"properties": {
"name": {
Expand Down

0 comments on commit 6676cdb

Please sign in to comment.