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;
/* Server configuration */
events { $i = 0;
worker_connections 1024; $i++;
} $cfg['Servers'][$i]['host'] = getenv('PMA_HOST');
$cfg['Servers'][$i]['port'] = getenv('PMA_PORT');
http { $cfg['Servers'][$i]['compress'] = false;
include /etc/nginx/mime.types; $cfg['Servers'][$i]['AllowNoPassword'] = false;
default_type application/octet-stream; $cfg['Servers'][$i]['auth_type'] = 'cookie';
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' /* Upload/save/import directories */
'$status $body_bytes_sent "$http_referer" ' $cfg['UploadDir'] = '';
'"$http_user_agent" "$http_x_forwarded_for"'; $cfg['SaveDir'] = '';
access_log /var/log/nginx/access.log main; /* Session settings */
$cfg['SessionSavePath'] = '/sessions';
sendfile on;
keepalive_timeout 65; /* Security settings */
$cfg['CheckConfigurationPermissions'] = true;
server { $cfg['AllowArbitraryServer'] = (bool)getenv('PMA_ARBITRARY');
listen 80;
server_name localhost; /* Performance settings */
$cfg['ExecTimeLimit'] = (int)getenv('MAX_EXECUTION_TIME');
root /var/www/html;
index index.php index.html index.htm; /* UI settings */
$cfg['NavigationTreeEnableGrouping'] = true;
location / { $cfg['NavigationTreeDbSeparator'] = '_';
try_files $uri $uri/ /index.php?$query_string; $cfg['NavigationTreeTableSeparator'] = '__';
}
/* Other settings */
location ~ \.php$ { $cfg['DefaultLang'] = 'en';
include fastcgi_params; $cfg['ServerDefault'] = 1;
fastcgi_pass 127.0.0.1:9000; $cfg['VersionCheck'] = false;
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 }}
}
}