Skip to content

Commit dfe1eee

Browse files
authored
fix(kibana): patch es-token secret to avoid replacing data (#752)
1 parent 99330fc commit dfe1eee

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

charts/kibana/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ maintainers:
55
- name: Wiremind
66
url: https://github.com/wiremind/wiremind-helm-charts
77
name: kibana
8-
version: 8.5.19
8+
version: 8.5.20
99
appVersion: 8.18.0
1010
sources:
1111
- https://github.com/wiremind/wiremind-helm-charts/tree/main/charts/kibana

charts/kibana/templates/token/configmap.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ data:
159159
echo "Updating kubernetes secret token"
160160
token=$(echo "$response_body" | jq -r '.token.value')
161161
token_base64=$(echo "$token" | base64 -w 0)
162-
k8s_secret_put=$(printf \
162+
k8s_secret_json=$(printf \
163163
'{
164164
"metadata": {
165165
"name": "%s"
@@ -170,13 +170,13 @@ data:
170170
}' "$K8S_SECRET_NAME" "$token_base64" )
171171
response=$(curl -k --max-time 5 --silent --show-error \
172172
-w "%{http_code}" \
173-
-X PUT \
173+
-X PATCH \
174174
--cacert "$K8S_CA" \
175175
-H "Authorization: Bearer $K8S_BEARER" \
176176
-H "Accept: application/json" \
177-
-H "Content-Type: application/json" \
177+
-H "Content-Type: application/strategic-merge-patch+json" \
178178
"$K8S_URL/api/v1/namespaces/$K8S_NAMESPACE/secrets/$K8S_SECRET_NAME" \
179-
-d "$k8s_secret_put"
179+
-d "$k8s_secret_json"
180180
)
181181
182182
http_code="${response: -3}"
@@ -262,7 +262,7 @@ data:
262262
# Avoid having same secret and deployment last update timestamp
263263
sleep 1
264264
265-
k8s_deployment_patch=$(printf \
265+
k8s_deployment_json=$(printf \
266266
'{
267267
"spec": {
268268
"template": {
@@ -282,7 +282,7 @@ data:
282282
-H "Accept: application/json" \
283283
-H "Content-Type: application/strategic-merge-patch+json" \
284284
"$K8S_URL/apis/apps/v1/namespaces/$K8S_NAMESPACE/deployments/$K8S_DEPLOYMENT_NAME?gracePeriodSeconds=0" \
285-
-d "$k8s_deployment_patch"
285+
-d "$k8s_deployment_json"
286286
)
287287
288288
http_code="${response: -3}"

0 commit comments

Comments
 (0)