Skip to content

Commit a3534e7

Browse files
committed
chart, salt: Add annotations to fluent-bit pod
Add annotations containing configmap and secret to fluent-bit pod so it is restarted whenever these objects are updated. MK8S-203
1 parent 2ecf9ec commit a3534e7

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
- Implement ability to add certificates to fluent-bit by mounting a fluent-bit-certs secret
6161
(PR[#4812](https://github.com/scality/metalk8s/pull/4812))
6262

63+
- Ensure fluent-bit pods are restarted when its configmap or secret is modified
64+
(PR[#4834](https://github.com/scality/metalk8s/pull/4834))
65+
6366
### Bug Fixes
6467

6568
- Fix a bug where part of the upgrade process would silently be skipped

charts/fluent-bit.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ image:
55
existingConfigMap: fluent-bit
66

77
podAnnotations:
8-
prometheus.io/scrape: "true"
9-
prometheus.io/port: "2020"
10-
prometheus.io/path: /api/v1/metrics/prometheus
8+
checksum/config: '__slot__:salt:metalk8s_kubernetes.get_object_digest(kind="ConfigMap", apiVersion="v1", namespace="metalk8s-logging", name="fluent-bit", path="data:fluent-bit.conf")'
9+
checksum/secret: '__slot__:salt:metalk8s_kubernetes.get_object_digest(kind="Secret", apiVersion="v1", namespace="metalk8s-logging", name="fluent-bit-certs")'
1110

1211
resources: '__var__(fluent_bit.spec.deployment.resources)'
1312

salt/metalk8s/addons/logging/fluent-bit/deployed/chart.sls

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,10 +1694,10 @@ spec:
16941694
template:
16951695
metadata:
16961696
annotations:
1697-
checksum/config: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
1698-
prometheus.io/path: /api/v1/metrics/prometheus
1699-
prometheus.io/port: '2020'
1700-
prometheus.io/scrape: 'true'
1697+
checksum/config: __slot__:salt:metalk8s_kubernetes.get_object_digest(kind="ConfigMap",
1698+
apiVersion="v1", namespace="metalk8s-logging", name="fluent-bit", path="data:fluent-bit.conf")
1699+
checksum/secret: __slot__:salt:metalk8s_kubernetes.get_object_digest(kind="Secret",
1700+
apiVersion="v1", namespace="metalk8s-logging", name="fluent-bit-certs")
17011701
labels:
17021702
app.kubernetes.io/instance: fluent-bit
17031703
app.kubernetes.io/name: fluent-bit

0 commit comments

Comments
 (0)