Files
phpfpm/templates/service-selenium.yaml
T
claude abb5dba4a1
Helm Chart Release / release-chart (push) Successful in 9s
fix: v8.5.10-bのDeployment.spec.selector変更が既存リリースのアップグレードを壊す不具合を修正
既存の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以降を使うこと。
2026-09-26 09:46:56 +09:00

19 lines
429 B
YAML

{{- if .Values.selenium.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "phpfpm.fullname" . }}-selenium
labels:
{{- include "phpfpm.labels" . | nindent 4 }}
app.kubernetes.io/component: selenium
spec:
type: ClusterIP
ports:
- port: 4444
targetPort: 4444
protocol: TCP
name: selenium
selector:
{{- include "phpfpm.selenium.selectorLabels" . | nindent 4 }}
{{- end }}