Files
phpfpm/values.yaml
Claude 06c63037f1
All checks were successful
Helm Chart Release / release-chart (push) Successful in 5s
feat: Add SMTP mail sending feature via msmtp
PHPアプリケーションからSMTP経由でメール送信を行う機能を追加。
msmtpをPHP-FPMコンテナに統合し、mail()関数で直接利用可能。

Features:
- STARTTLS(port 587)とSSL/TLS(port 465)に対応
- 送信元アドレスは固定だがPHPで上書き指定可能
- パスワードはKubernetes Secretで安全に管理
- 自己署名証明書対応オプション
- Gmail、Office365など一般的なSMTPサーバーに対応

Changes:
- values.yaml: smtp設定セクションを追加
- templates/secret-smtp.yaml: パスワード管理用Secret
- templates/configmap-smtp.yaml: msmtprc設定ファイル生成
- templates/configmap-smtp.yaml: PHPヘルパークラス(SmtpConfig)
- templates/deployment.yaml: msmtpインストールと設定
- README.md: SMTP設定パラメータ表と使用例を追加

Protocol support:
- auto: 自動判定(推奨)
- starttls: SMTP + STARTTLS(ポート587)
- tls: SSL/TLS(ポート465)

PHP Usage:
  SmtpConfig::init();
  mail($to, $subject, $body);
  // または別の送信者で上書き
  SmtpConfig::mail($to, $subject, $body, $headers, 'custom@example.com');

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-24 10:44:12 +09:00

176 lines
4.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
replicaCount: 1
image:
nginx:
registry: docker.io
repository: nginx
tag: "1.29.5-alpine-perl"
pullPolicy: IfNotPresent
php:
registry: docker.io
repository: php
tag: "8.5.3-fpm-alpine3.23"
pullPolicy: IfNotPresent
selenium:
registry: docker.io
repository: selenium/standalone-chromium
tag: "144.0-chromedriver-144.0"
pullPolicy: IfNotPresent
service:
# type: ClusterIP
type: LoadBalancer
port: 80
ingress:
enabled: false
className: ""
annotations: {}
# {
# acme.cert-manager.io/http01-ingress-class: "nginx",
# cert-manager.io/cluster-issuer: "letsencrypt-issuer",
# nginx.ingress.kubernetes.io/from-to-www-redirect: "true",
# nginx.ingress.kubernetes.io/proxy-body-size: "100m"
# }
hosts:
- host: example.tld
paths:
- path: /
pathType: Prefix
tls: []
# [
# {
# hosts: [ "example.com" ],
# secretName: "example-tls"
# }
# ]
persistence:
enabled: true
accessMode: ReadWriteOnce
size: 1Gi
nginx:
customConfig:
enabled: false
snippet: |-
# リアルIP転送設定ベアメタル/LoadBalancer環境向け
forwardRealIP:
# リアルIP取得機能を有効化
enabled: false
# リアルIPを取得するヘッダー名
# LoadBalancer/Ingressによって異なる
# - X-Real-IP: シンプルな1段プロキシ
# - X-Forwarded-For: 多段プロキシ対応(推奨)
header: "X-Forwarded-For"
# 再帰的にリアルIPを検索多段プロキシ環境で推奨
recursive: true
# 信頼するプロキシのネットワーク範囲
# ベアメタルクラスターでは、PodネットワークとServiceネットワークを指定
trustedProxies:
- "10.0.0.0/8" # プライベートネットワーク
- "172.16.0.0/12" # プライベートネットワーク
- "192.168.0.0/16" # プライベートネットワーク
# 追加で信頼するプロキシ(環境に応じてカスタマイズ)
additionalTrustedProxies: []
# - "203.0.113.0/24" # 外部LoadBalancerなど
# Composer設定
composer:
# Composerを使用するかどうか
enabled: false
# Composerでインストールするパッケージ
# packages配列が空の場合、composer.jsonを使用
packages: []
# - "monolog/monolog:^2.0"
# - "guzzlehttp/guzzle:^7.0"
# composer.jsonファイルを使用する場合
useComposerJson: false
# composer.jsonの内容useComposerJson: trueの場合に使用
composerJson: |
{
"require": {
"monolog/monolog": "^2.0"
}
}
# composer.lockファイルの内容オプション、再現性を保証
composerLock: ""
# Composerのインストールオプション
installOptions: "--no-dev --optimize-autoloader"
# 追加のAPKパッケージComposer依存関係のビルドに必要な場合
additionalApkPackages: []
# - "libpng-dev"
# - "libjpeg-turbo-dev"
# 追加のPHP拡張docker-php-ext-installで導入
additionalPhpExtensions: []
# - "gd"
# - "zip"
# Selenium設定レガシー互換性維持
selenium:
enabled: false
externalDatabase:
enabled: false
host: mariadb-hostname
port: 3306
database: dbname
username: user
password: pass
# SMTP設定PHPのメール送信用
smtp:
enabled: false
# SMTPサーバー設定
host: "smtp.example.com"
# プロトコルとポート設定
# - auto: 自動判定(推奨)
# - starttls: STARTTLSポート587
# - tls: SSL/TLSポート465
protocol: "auto"
# ポート番号(通常は自動判定されるため手動設定は不要)
# protocol: auto の場合は以下の値を参考に
# - 25: SMTP (非暗号化)
# - 587: SMTP + STARTTLS (暗号化)
# - 465: SMTP + SSL/TLS (暗号化)
port: 587
# 認証設定
auth:
enabled: true
username: "smtp-user@example.com"
# password はSecretで管理する
# values-secret.yaml などで以下のように指定:
# smtp:
# auth:
# password: "your-smtp-password"
password: ""
# 送信元アドレス(固定値)
# PHPプログラムで mail() 関数の $additional_parameters で上書き可能
# 例: mail($to, $subject, $body, $headers, "-f user@example.com")
from: "noreply@example.com"
# TLS/SSL設定
tls:
# 証明書検証を有効化(本番環境では true を推奨)
verify: true
# 自己署名証明書を許可する場合(テスト環境のみ)
allowSelfSigned: false
resources: {}