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
6 changes: 3 additions & 3 deletions chart/skywalking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ The following table lists the configurable parameters of the Skywalking chart an
| `oap.ports.grpc` | OAP grpc port for tracing or metric | `11800` |
| `oap.ports.rest` | OAP http port for the GraphQL query protocol (used by the UI and by `swctl`) | `12800` |
| `oap.ports.admin` | OAP admin REST port (runtime-rule, DSL debugging, inspect, status). Required by Horizon UI's admin features; available on OAP 10.5+ | `17128` |
| `oap.ports.zipkinreceiver` | OAP http port for Zipkin receiver(not exposed by default) | `9411` |
| `oap.ports.zipkinquery` | OAP http port for querying Zipkin traces and UI(not exposed by default) | `9412` |
| `oap.ports.zipkin-receiver` | OAP http port for Zipkin receiver(not exposed by default) | `9411` |
| `oap.ports.zipkin-query` | OAP http port for querying Zipkin traces and UI(not exposed by default) | `9412` |
| `oap.replicas` | OAP k8s deployment replicas | `2` |
| `oap.service.type` | OAP svc type | `ClusterIP` |
| `oap.service.annotations` | OAP svc annotations | `{}` |
Expand Down Expand Up @@ -102,7 +102,7 @@ The following table lists the configurable parameters of the Skywalking chart an
| `ui.persistence.storageClass` | Storage class for the chart-managed PVC | `""` |
| `ui.persistence.accessModes` | PVC access modes | `[ReadWriteOnce]` |
| `ui.persistence.size` | PVC size | `1Gi` |
| `ui.config` | `horizon.yaml` content (deep-merged onto chart defaults that point `oap.queryUrl`/`adminUrl` at the in-cluster OAP). See the upstream [`horizon.example.yaml`](https://github.com/apache/skywalking-horizon-ui/blob/main/horizon.example.yaml) and [horizon.yaml reference](https://github.com/apache/skywalking-horizon-ui/blob/main/docs/setup/horizon-yaml.md). `auth.local.users` defaults to empty (BFF refuses to start); see the root README "Web UI" section for a demo snippet and the production Secret pattern | see `values.yaml` |
| `ui.config` | `horizon.yaml` content (deep-merged onto chart defaults that point `oap.queryUrl`/`adminUrl`/`zipkinUrl` at the in-cluster OAP; `zipkinUrl` is derived from `oap.ports.zipkin-query` and only resolves to a usable URL when that port is set). See the upstream [`horizon.example.yaml`](https://github.com/apache/skywalking-horizon-ui/blob/main/horizon.example.yaml) and [horizon.yaml reference](https://github.com/apache/skywalking-horizon-ui/blob/main/docs/setup/horizon-yaml.md). `auth.local.users` defaults to empty (BFF refuses to start); see the root README "Web UI" section for a demo snippet and the production Secret pattern | see `values.yaml` |
| `ui.envFromSecret` | Reference a Secret whose keys are exposed as env vars in the BFF container, for use with `${VAR}` interpolation in `ui.config` (e.g. admin password hash) | `""` |
| `ui.extraEnv` | Extra env vars passed to the BFF container | `[]` |
| `oapInit.nodeAffinity` | OAP init job node affinity policy | `{}` |
Expand Down
8 changes: 4 additions & 4 deletions chart/skywalking/templates/oap-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,17 @@ spec:
{{ toYaml .Values.oap.resources | indent 10 }}
{{- end }}
env:
{{- if .Values.oap.ports.zipkinreceiver }}
{{- if index .Values.oap.ports "zipkin-receiver" }}
- name: SW_RECEIVER_ZIPKIN
value: default
- name: SW_RECEIVER_ZIPKIN_REST_PORT
value: "{{ .Values.oap.ports.zipkinreceiver }}"
value: "{{ index .Values.oap.ports "zipkin-receiver" }}"
{{- end }}
{{- if .Values.oap.ports.zipkinquery }}
{{- if index .Values.oap.ports "zipkin-query" }}
- name: SW_QUERY_ZIPKIN
value: default
- name: SW_QUERY_ZIPKIN_REST_PORT
value: "{{ .Values.oap.ports.zipkinquery }}"
value: "{{ index .Values.oap.ports "zipkin-query" }}"
{{- end }}
- name: JAVA_OPTS
value: "-Dmode=no-init {{ .Values.oap.javaOpts }}"
Expand Down
16 changes: 10 additions & 6 deletions chart/skywalking/templates/ui-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@ horizon.yaml is built by deep-merging:
2. whatever the operator put in `ui.config`
The merge order means user values win on every field except oap.queryUrl /
oap.adminUrl, where we always default to the in-cluster service if the
operator left them unset.
operator left them unset. zipkinUrl is only injected when the Zipkin query
port is enabled — Horizon's BFF rejects an empty/non-URL value at startup.
*/ -}}
{{- $defaults := dict
"oap" (dict
"queryUrl" (printf "http://%s:%v" (include "skywalking.oap.fullname" .) .Values.oap.ports.rest)
"adminUrl" (printf "http://%s:%v" (include "skywalking.oap.fullname" .) (default 17128 .Values.oap.ports.admin))
)
{{- $oapDefaults := dict
"queryUrl" (printf "http://%s:%v" (include "skywalking.oap.fullname" .) .Values.oap.ports.rest)
"adminUrl" (printf "http://%s:%v" (include "skywalking.oap.fullname" .) (default 17128 .Values.oap.ports.admin))
}}
{{- $zipkinQueryPort := index .Values.oap.ports "zipkin-query" }}
{{- if $zipkinQueryPort }}
{{- $_ := set $oapDefaults "zipkinUrl" (printf "http://%s:%v/zipkin" (include "skywalking.oap.fullname" .) $zipkinQueryPort) }}
{{- end }}
{{- $defaults := dict "oap" $oapDefaults }}
{{- $userConfig := default (dict) .Values.ui.config }}
{{- $merged := mergeOverwrite (deepCopy $defaults) (deepCopy $userConfig) }}
apiVersion: v1
Expand Down
8 changes: 6 additions & 2 deletions chart/skywalking/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ oap:
# null (or remove) if the deployed OAP version predates 10.5 — Horizon
# admin features will be unavailable in that case.
admin: 17128
# zipkinreceiver: 9411
# zipkinquery: 9412
# zipkin-receiver: 9411
# zipkin-query: 9412
# promql: 9090
# logql: 3100
# traceql: 3200
# metrics: 1234
replicas: 2
service:
type: ClusterIP
Expand Down
Loading