fix: v8.5.10-bのDeployment.spec.selector変更が既存リリースのアップグレードを壊す不具合を修正
Helm Chart Release / release-chart (push) Successful in 9s
Helm Chart Release / release-chart (push) Successful in 9s
既存のnginx/php-fpm Deploymentのspec.selector.matchLabelsにapp.kubernetes.io/component:webを追加していたが、Deployment.spec.selectorは作成後immutableのためhelm upgradeが'field is immutable'で失敗していた。既存Deploymentのselectorは元の内容(name+instanceのみ)に戻し、Selenium側はcomponentラベルではなくapp.kubernetes.io/name自体を<chart名>-seleniumという別名にする方式(新ヘルパーphpfpm.selenium.name/phpfpm.selenium.selectorLabels)に変更した。componentラベルだけを足す設計だとSeleniumのPodもnginx/php-fpm側Deploymentのselectorに一致してしまいReplicaSetの選択重複を起こすため、name自体をvariantにして構造的に防止する。v8.5.10-bは既存リリースへの適用不可のためスキップし、v8.5.10-c以降を使うこと。
This commit is contained in:
@@ -23,12 +23,11 @@ spec:
|
||||
replicas: {{ .Values.selenium.replicaCount | default 1 }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "phpfpm.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: selenium
|
||||
{{- include "phpfpm.selenium.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "phpfpm.selectorLabels" . | nindent 8 }}
|
||||
{{- include "phpfpm.selenium.selectorLabels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: selenium
|
||||
spec:
|
||||
containers:
|
||||
|
||||
Reference in New Issue
Block a user