Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deploy/k8s/charts/scope-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0
version: 1.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
5 changes: 4 additions & 1 deletion deploy/k8s/charts/scope-api/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,14 @@ Precedence:

{{/*
Resolve the internal OTLP endpoint used by the API.
Uses global.otelCollectorName when set (must match the collector Service name,
i.e. otelCollector.fullnameOverride in the umbrella chart), else <baseName>-otel-collector.
*/}}
{{- define "scope-api.otelEndpoint" -}}
{{- $global := get .Values "global" | default dict -}}
{{- $baseName := get $global "baseName" | default "scope" -}}
{{- printf "http://%s-otel-collector:4318" $baseName -}}
{{- $collectorName := get $global "otelCollectorName" | default (printf "%s-otel-collector" $baseName) -}}
{{- printf "http://%s:4318" $collectorName -}}
{{- end -}}

{{/*
Expand Down
2 changes: 1 addition & 1 deletion deploy/k8s/charts/scope-ui/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: "1.0.0"
version: "1.0.1"

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
6 changes: 3 additions & 3 deletions deploy/k8s/charts/scope/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ maintainers:
- name: Outshift Open
email: oss-github@cisco.com
type: application
version: 1.0.0
version: 1.0.1
appVersion: "1.0.0"
dependencies:
- name: ioc-scope-api
alias: api
version: 1.0.0
version: 1.0.1
repository: oci://ghcr.io/ioc-project/charts
condition: api.enabled
- name: ioc-scope-ui
alias: ui
version: 1.0.0
version: 1.0.1
repository: oci://ghcr.io/ioc-project/charts
condition: ui.enabled
- name: opentelemetry-collector
Expand Down
12 changes: 11 additions & 1 deletion deploy/k8s/charts/scope/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,18 @@ branch workers (cognitive-failure, cognition-protocols) that are deployed, so th
{{- join "," (uniq $queues) -}}
{{- end }}

{{- /*
Name of the OpenTelemetry collector Service/Deployment. Follows
otelCollector.fullnameOverride (the name the subchart really uses) so the
endpoint and ConfigMap names stay consistent with it.
*/ -}}
{{- define "scope.otelCollectorName" -}}
{{- printf "%s-otel-collector" (include "scope.fullname" .) -}}
{{- default (printf "%s-otel-collector" (include "scope.fullname" .)) .Values.otelCollector.fullnameOverride -}}
{{- end }}

{{- define "scope.otelCollectorConfigMapName" -}}
{{- $cm := .Values.otelCollector.configMap | default dict -}}
{{- default (printf "%s-config" (include "scope.otelCollectorName" .)) $cm.existingName -}}
{{- end }}

{{- define "scope.apiBaseUrl" -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "scope.otelCollectorName" . }}-config
name: {{ include "scope.otelCollectorConfigMapName" . }}
labels:
{{- include "scope.labels" . | nindent 4 }}
data:
Expand Down
2 changes: 1 addition & 1 deletion deploy/k8s/charts/scope/templates/worker-mce.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ spec:
{{- end }}
{{- with $worker.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- end }}
10 changes: 9 additions & 1 deletion deploy/k8s/charts/scope/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ global:
# Base resource name used for shared internal services such as scope-api,
# scope-clickhouse, scope-rabbitmq, scope-neo4j, and scope-otel-collector.
baseName: "scope"
# Name of the OpenTelemetry collector Service, used by scope-api to build the
# OTLP endpoint. Must equal otelCollector.fullnameOverride below.
otelCollectorName: scope-otel-collector
# Optional shared external dependency endpoints.
# Set these once to avoid duplicating host/port across component sections.
# Component-level values still override when explicitly set.
Expand Down Expand Up @@ -253,6 +256,9 @@ neo4j:

otelCollector:
enabled: true
# NOTE: fullnameOverride and configMap.existingName are read by the umbrella
# templates (OTLP endpoint, ConfigMap name). When renaming (e.g. a custom
# global.baseName), change both together.
fullnameOverride: scope-otel-collector
# When disabled, this chart does not inject OTEL_EXPORTER_OTLP_ENDPOINT.
# Use an external mechanism if telemetry export is still required.
Expand Down Expand Up @@ -591,7 +597,9 @@ workers:
volumes:
- name: mce-config
configMap:
name: scope-mce-config
# Templated (tpl): must match the ConfigMap created by this chart,
# which follows global.baseName.
name: '{{ include "scope.mceConfigMapName" . }}'
resources:
requests:
memory: 384Mi
Expand Down
Loading