Skip to content

Commit 21824a4

Browse files
committed
Merge branch 'main' of github.com:user-cube/bootchain-operator
2 parents b8e581f + f3ef808 commit 21824a4

7 files changed

Lines changed: 108 additions & 52 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [1.3.1](https://github.com/user-cube/bootchain-operator/compare/v1.3.0...v1.3.1) (2026-03-01)
2+
3+
4+
### Bug Fixes
5+
6+
* update dashboard; use full fqdn ([#15](https://github.com/user-cube/bootchain-operator/issues/15)) ([dfe671b](https://github.com/user-cube/bootchain-operator/commit/dfe671b9076b49da34c7eb99891b149afcdf9f29))
7+
18
# [1.3.0](https://github.com/user-cube/bootchain-operator/compare/v1.2.4...v1.3.0) (2026-03-01)
29

310

charts/bootchain-operator/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [1.3.1](https://github.com/user-cube/bootchain-operator/compare/v1.3.0...v1.3.1) (2026-03-01)
2+
3+
4+
### Bug Fixes
5+
6+
* update dashboard; use full fqdn ([#15](https://github.com/user-cube/bootchain-operator/issues/15)) ([dfe671b](https://github.com/user-cube/bootchain-operator/commit/dfe671b9076b49da34c7eb99891b149afcdf9f29))
7+
18
# [1.3.0](https://github.com/user-cube/bootchain-operator/compare/v1.2.4...v1.3.0) (2026-03-01)
29

310

charts/bootchain-operator/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ description: >-
44
A Kubernetes operator that makes service boot dependencies declarative and
55
automatic, eliminating hand-written init containers.
66
type: application
7-
version: 1.3.0
8-
appVersion: v1.3.0
7+
version: 1.3.1
8+
appVersion: v1.3.1
99
keywords:
1010
- kubernetes
1111
- operator

charts/bootchain-operator/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# bootchain-operator
22

3-
![Version: 1.3.0](https://img.shields.io/badge/Version-1.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.3.0](https://img.shields.io/badge/AppVersion-v1.3.0-informational?style=flat-square)
3+
![Version: 1.3.1](https://img.shields.io/badge/Version-1.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.3.1](https://img.shields.io/badge/AppVersion-v1.3.1-informational?style=flat-square)
44

55
A Kubernetes operator that makes service boot dependencies declarative and automatic, eliminating hand-written init containers.
66

charts/bootchain-operator/artifacthub-pkg.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 1.3.0
1+
version: 1.3.1
22
name: bootchain-operator
33
displayName: Bootchain Operator
44
description: Helm chart that deploys the Bootchain Operator.
@@ -17,10 +17,10 @@ annotations:
1717
artifacthub.io/category: kubernetes
1818
artifacthub.io/license: Apache-2.0
1919
artifacthub.io/maintainers: user-cube
20-
createdAt: '2026-03-01T01:06:47Z'
20+
createdAt: '2026-03-01T01:50:31Z'
2121
changes:
22-
- kind: added
23-
description: add grafana dashboard ([#14](https://github.com/user-cube/bootchain-operator/issues/14))
22+
- kind: fixed
23+
description: update dashboard; use full fqdn ([#15](https://github.com/user-cube/bootchain-operator/issues/15))
2424
links:
25-
- name: Commit 5505a10
26-
url: https://github.com/user-cube/bootchain-operator/commit/5505a104ee234e5f63f09af3231068c110014155
25+
- name: Commit dfe671b
26+
url: https://github.com/user-cube/bootchain-operator/commit/dfe671b9076b49da34c7eb99891b149afcdf9f29

charts/bootchain-operator/templates/grafana-dashboard.yaml

Lines changed: 72 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,12 @@ data:
6262
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
6363
"fieldConfig": {
6464
"defaults": {
65-
"color": { "mode": "thresholds" },
65+
"color": { "mode": "fixed", "fixedColor": "green" },
6666
"mappings": [],
6767
"thresholds": {
6868
"mode": "absolute",
6969
"steps": [
70-
{ "color": "green", "value": null },
71-
{ "color": "red", "value": 1 }
70+
{ "color": "green", "value": null }
7271
]
7372
},
7473
"unit": "short"
@@ -89,7 +88,7 @@ data:
8988
"targets": [
9089
{
9190
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
92-
"expr": "count(bootchain_dependencies_total{namespace=~\"$namespace\"})",
91+
"expr": "count(bootchain_dependencies_total{namespace=~\"$namespace\"}) or vector(0)",
9392
"instant": true,
9493
"legendFormat": "",
9594
"refId": "A"
@@ -107,8 +106,7 @@ data:
107106
"thresholds": {
108107
"mode": "absolute",
109108
"steps": [
110-
{ "color": "red", "value": null },
111-
{ "color": "green", "value": 1 }
109+
{ "color": "green", "value": null }
112110
]
113111
},
114112
"unit": "short"
@@ -129,7 +127,7 @@ data:
129127
"targets": [
130128
{
131129
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
132-
"expr": "sum(bootchain_dependencies_ready{namespace=~\"$namespace\"})",
130+
"expr": "sum(bootchain_dependencies_ready{namespace=~\"$namespace\"}) or vector(0)",
133131
"instant": true,
134132
"legendFormat": "",
135133
"refId": "A"
@@ -148,8 +146,7 @@ data:
148146
"mode": "absolute",
149147
"steps": [
150148
{ "color": "green", "value": null },
151-
{ "color": "yellow", "value": 1 },
152-
{ "color": "red", "value": 5 }
149+
{ "color": "red", "value": 1 }
153150
]
154151
},
155152
"unit": "short"
@@ -170,7 +167,7 @@ data:
170167
"targets": [
171168
{
172169
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
173-
"expr": "sum(bootchain_dependencies_total{namespace=~\"$namespace\"}) - sum(bootchain_dependencies_ready{namespace=~\"$namespace\"})",
170+
"expr": "(sum(bootchain_dependencies_total{namespace=~\"$namespace\"}) or vector(0)) - (sum(bootchain_dependencies_ready{namespace=~\"$namespace\"}) or vector(0))",
174171
"instant": true,
175172
"legendFormat": "",
176173
"refId": "A"
@@ -184,7 +181,9 @@ data:
184181
"fieldConfig": {
185182
"defaults": {
186183
"color": { "mode": "thresholds" },
187-
"mappings": [],
184+
"mappings": [
185+
{ "options": { "match": "null", "result": { "color": "green", "index": 0, "text": "0%" } }, "type": "special" }
186+
],
188187
"thresholds": {
189188
"mode": "absolute",
190189
"steps": [
@@ -201,7 +200,7 @@ data:
201200
"id": 4,
202201
"options": {
203202
"colorMode": "background",
204-
"graphMode": "area",
203+
"graphMode": "none",
205204
"justifyMode": "auto",
206205
"orientation": "auto",
207206
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
@@ -211,8 +210,8 @@ data:
211210
"targets": [
212211
{
213212
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
214-
"expr": "rate(bootchain_reconcile_total{result=\"error\"}[$__rate_interval]) / rate(bootchain_reconcile_total[$__rate_interval])",
215-
"instant": false,
213+
"expr": "(sum(rate(bootchain_reconcile_total{result=\"error\"}[5m])) or vector(0)) / ((sum(rate(bootchain_reconcile_total[5m])) or vector(0)) > 0)",
214+
"instant": true,
216215
"legendFormat": "",
217216
"refId": "A"
218217
}
@@ -388,10 +387,36 @@ data:
388387
}
389388
},
390389
"overrides": [
391-
{ "matcher": { "id": "byName", "options": "namespace" }, "properties": [{ "id": "custom.width", "value": 120 }] },
392-
{ "matcher": { "id": "byName", "options": "name" }, "properties": [{ "id": "custom.width", "value": 200 }] },
393-
{ "matcher": { "id": "byName", "options": "ready" }, "properties": [{ "id": "custom.width", "value": 80 }] },
394-
{ "matcher": { "id": "byName", "options": "total" }, "properties": [{ "id": "custom.width", "value": 70 }] }
390+
{ "matcher": { "id": "byName", "options": "namespace" }, "properties": [{ "id": "custom.width", "value": 160 }] },
391+
{ "matcher": { "id": "byName", "options": "name" }, "properties": [{ "id": "custom.width", "value": 220 }] },
392+
{
393+
"matcher": { "id": "byName", "options": "ready" },
394+
"properties": [
395+
{ "id": "custom.width", "value": 80 },
396+
{ "id": "custom.cellOptions", "value": { "type": "auto" } }
397+
]
398+
},
399+
{
400+
"matcher": { "id": "byName", "options": "total" },
401+
"properties": [
402+
{ "id": "custom.width", "value": 80 },
403+
{ "id": "custom.cellOptions", "value": { "type": "auto" } }
404+
]
405+
},
406+
{
407+
"matcher": { "id": "byName", "options": "Value #A" },
408+
"properties": [
409+
{ "id": "displayName", "value": "ready" },
410+
{ "id": "custom.width", "value": 80 }
411+
]
412+
},
413+
{
414+
"matcher": { "id": "byName", "options": "Value #B" },
415+
"properties": [
416+
{ "id": "displayName", "value": "total" },
417+
{ "id": "custom.width", "value": 80 }
418+
]
419+
}
395420
]
396421
},
397422
"gridPos": { "h": 8, "w": 24, "x": 0, "y": 14 },
@@ -404,53 +429,57 @@ data:
404429
},
405430
"pluginVersion": "10.0.0",
406431
"targets": [
407-
{
408-
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
409-
"expr": "label_replace(\n bootchain_dependencies_ready{namespace=~\"$namespace\", name=~\"$bootdependency\"}\n == bootchain_dependencies_total{namespace=~\"$namespace\", name=~\"$bootdependency\"},\n \"status\", \"1\", \"\", \"\"\n) or label_replace(\n bootchain_dependencies_ready{namespace=~\"$namespace\", name=~\"$bootdependency\"}\n != bootchain_dependencies_total{namespace=~\"$namespace\", name=~\"$bootdependency\"},\n \"status\", \"0\", \"\", \"\"\n)",
410-
"format": "table",
411-
"instant": true,
412-
"legendFormat": "",
413-
"refId": "A"
414-
},
415432
{
416433
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
417434
"expr": "bootchain_dependencies_ready{namespace=~\"$namespace\", name=~\"$bootdependency\"}",
418435
"format": "table",
419436
"instant": true,
420437
"legendFormat": "",
421-
"refId": "B"
438+
"refId": "A"
422439
},
423440
{
424441
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
425442
"expr": "bootchain_dependencies_total{namespace=~\"$namespace\", name=~\"$bootdependency\"}",
426443
"format": "table",
427444
"instant": true,
428445
"legendFormat": "",
429-
"refId": "C"
446+
"refId": "B"
430447
}
431448
],
432449
"title": "BootDependency Status Table",
433450
"transformations": [
434-
{ "id": "joinByField", "options": { "byField": "name", "mode": "outer" } },
451+
{
452+
"id": "joinByLabels",
453+
"options": { "labels": ["namespace", "name"] }
454+
},
435455
{
436456
"id": "organize",
437457
"options": {
438-
"excludeByName": {
439-
"Time": true, "Time 1": true, "Time 2": true, "Time 3": true,
440-
"namespace 2": true, "namespace 3": true,
441-
"__name__ 1": true, "__name__ 2": true, "__name__ 3": true,
442-
"job 1": true, "job 2": true, "job 3": true,
443-
"instance 1": true, "instance 2": true, "instance 3": true,
444-
"status": true
458+
"excludeByName": {},
459+
"indexByName": {
460+
"namespace": 0,
461+
"name": 1,
462+
"Value #A": 2,
463+
"Value #B": 3
445464
},
446465
"renameByName": {
447-
"namespace 1": "namespace",
448-
"name": "name",
449-
"Value #B": "ready",
450-
"Value #C": "total",
451-
"Value #A": "all_ready"
466+
"Value #A": "ready",
467+
"Value #B": "total"
452468
}
453469
}
470+
},
471+
{
472+
"id": "calculateField",
473+
"options": {
474+
"alias": "status",
475+
"binary": {
476+
"left": "ready",
477+
"operator": "==",
478+
"right": "total"
479+
},
480+
"mode": "reduceRow",
481+
"reduce": { "reducer": "sum" }
482+
}
454483
}
455484
],
456485
"type": "table"
@@ -751,8 +780,8 @@ data:
751780
"time": { "from": "now-1h", "to": "now" },
752781
"timepicker": {},
753782
"timezone": "browser",
754-
"title": "bootchain-operator",
783+
"title": "Bootchain Operator",
755784
"uid": "bootchain-operator-v1",
756-
"version": 1
785+
"version": 3
757786
}
758787
{{- end }}

internal/controller/bootdependency_controller_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,19 @@ var _ = Describe("BootDependency Controller", func() {
194194
Expect(<-probed).To(Equal("/ready"))
195195
})
196196

197+
It("should build FQDN from service name and BootDependency namespace for HTTP probes", func() {
198+
// Unit-test depHost directly to guard against the regression where service-based
199+
// HTTP probes used the bare service name instead of the FQDN, causing DNS lookup
200+
// failures when the controller runs in a different namespace than the target service.
201+
dep := corev1alpha1.ServiceDependency{Service: "my-svc", Port: 8080}
202+
Expect(depHost(dep, "my-namespace")).To(Equal("my-svc.my-namespace.svc.cluster.local"))
203+
})
204+
205+
It("should use the host field directly when set, not build a FQDN", func() {
206+
dep := corev1alpha1.ServiceDependency{Host: "external.example.com", Port: 443}
207+
Expect(depHost(dep, "any-namespace")).To(Equal("external.example.com"))
208+
})
209+
197210
It("should resolve an HTTPS dependency when insecure=true and server has a self-signed cert", func() {
198211
srv := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
199212
w.WriteHeader(http.StatusOK)

0 commit comments

Comments
 (0)