templates/configmap.yaml を更新

This commit is contained in:
2025-11-20 06:56:09 +00:00
parent 102d2579ee
commit e7c0fb56e7

View File

@@ -1,60 +1,45 @@
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: {{ include "{{ .Chart.Name }}.fullname" . }}-nginx-config name: {{ include "phpmyadmin-nginx.fullname" . }}
labels: labels:
{{- include "{{ .Chart.Name }}.labels" . | nindent 4 }} {{- include "phpmyadmin-nginx.labels" . | nindent 4 }}
data: data:
nginx.conf: | config.inc.php: |
user nginx; <?php
worker_processes 1; /* phpMyAdmin configuration */
error_log /var/log/nginx/error.log warn; $cfg['blowfish_secret'] = getenv('PMA_BLOWFISH_SECRET') ?: '';
pid /var/run/nginx.pid;
events { /* Server configuration */
worker_connections 1024; $i = 0;
} $i++;
$cfg['Servers'][$i]['host'] = getenv('PMA_HOST');
$cfg['Servers'][$i]['port'] = getenv('PMA_PORT');
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
http { /* Upload/save/import directories */
include /etc/nginx/mime.types; $cfg['UploadDir'] = '';
default_type application/octet-stream; $cfg['SaveDir'] = '';
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' /* Session settings */
'$status $body_bytes_sent "$http_referer" ' $cfg['SessionSavePath'] = '/sessions';
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main; /* Security settings */
$cfg['CheckConfigurationPermissions'] = true;
$cfg['AllowArbitraryServer'] = (bool)getenv('PMA_ARBITRARY');
sendfile on; /* Performance settings */
keepalive_timeout 65; $cfg['ExecTimeLimit'] = (int)getenv('MAX_EXECUTION_TIME');
server { /* UI settings */
listen 80; $cfg['NavigationTreeEnableGrouping'] = true;
server_name localhost; $cfg['NavigationTreeDbSeparator'] = '_';
$cfg['NavigationTreeTableSeparator'] = '__';
root /var/www/html; /* Other settings */
index index.php index.html index.htm; $cfg['DefaultLang'] = 'en';
$cfg['ServerDefault'] = 1;
location / { $cfg['VersionCheck'] = false;
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
{{- if .Values.nginx.customConfig.enabled }}
{{ .Values.nginx.customConfig.snippet | indent 12 }}
{{- end }}
}
}