Fix configmaps
This commit is contained in:
parent
12a3bbe73b
commit
75f1a7fd5c
|
@ -6,3 +6,4 @@ resources:
|
|||
- redis-deployment.yml
|
||||
- redis-service.yml
|
||||
- s3-service.yml
|
||||
- script-configmap.yml
|
||||
|
|
|
@ -488,12 +488,3 @@ data:
|
|||
),
|
||||
|
||||
);
|
||||
nc-upgrade.sh: |
|
||||
#!/bin/bash
|
||||
sed "s/config_is_read_only\(.\) => true,/config_is_read_only\1 => false,/" /var/www/html/config/config.php > /var/www/html/config/config.php.tmp
|
||||
mv /var/www/html/config/config.php.tmp /var/www/html/config/config.php
|
||||
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ upgrade
|
||||
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ maintenance:repair
|
||||
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ maintenance:mode --off
|
||||
sed "s/config_is_read_only\(.\) => false,/config_is_read_only\1 => true,/" /var/www/html/config/config.php > /var/www/html/config/config.php.tmp
|
||||
mv /var/www/html/config/config.php.tmp /var/www/html/config/config.php
|
||||
|
|
|
@ -34,13 +34,23 @@ spec:
|
|||
- name: nextcloud-data
|
||||
mountPath: /var/www/html/config/
|
||||
subPath: config
|
||||
- name: default-config
|
||||
- name: nextcloud-configmap
|
||||
mountPath: /etc/apache2/sites-enabled/000-default.conf
|
||||
subPath: 000-default.conf
|
||||
- name: hugepage
|
||||
mountPath: /dev/hugepages
|
||||
- name: nc-upgrade
|
||||
mountPath: /usr/local/bin
|
||||
- name: script-configmap
|
||||
mountPath: /usr/local/bin/nc-upgrade
|
||||
subPath: nc-upgrade
|
||||
- name: nextcloud-configmap
|
||||
mountPath: /etc/php/8.0/apache2/php.ini
|
||||
subPath: apache.php.ini
|
||||
- name: nextcloud-configmap
|
||||
mountPath: /etc/php/8.0/mods-available/apcu.ini
|
||||
subPath: apcu.ini
|
||||
- name: nextcloud-configmap
|
||||
mountPath: /etc/php/8.0/cli/php.ini
|
||||
subPath: cli.php.ini
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1500m
|
||||
|
@ -79,15 +89,6 @@ spec:
|
|||
- name: nextcloud-data
|
||||
mountPath: /var/www/html/config
|
||||
subPath: config
|
||||
- name: apache-php-config
|
||||
mountPath: /etc/php/8.0/
|
||||
subPath: apache2/php.ini
|
||||
- name: apcu-php-config
|
||||
mountPath: /etc/php/8.0/
|
||||
subPath: mods-available/apcu.ini
|
||||
- name: cli-php-config
|
||||
mountPath: /etc/php/8.0/
|
||||
subPath: cli/php.ini
|
||||
env:
|
||||
- name: GSS_MASTER_URL
|
||||
value: "https://drive.test.sunet.se"
|
||||
|
@ -178,47 +179,27 @@ spec:
|
|||
value: "customer.drive.test.sunet.se"
|
||||
command: ["/bin/bash", "-c", "/usr/bin/j2 -f env -o /var/www/html/config/config.php /tmp/config.php.template"]
|
||||
volumes:
|
||||
- name: nextcloud-config-template
|
||||
- name: nc-upgrade
|
||||
configMap:
|
||||
name: script-configmap
|
||||
items:
|
||||
- key: "nc-upgrade.sh"
|
||||
path: "nc-upgrade"
|
||||
defaultMode: 0744
|
||||
- name: nextcloud-config
|
||||
configMap:
|
||||
name: nextcloud-configmap
|
||||
items:
|
||||
- key: "config.php"
|
||||
path: "config.php"
|
||||
- name: nc-upgrade
|
||||
configMap:
|
||||
name: nextcloud-configmap
|
||||
items:
|
||||
- key: "nc-upgrade.sh"
|
||||
path: "nc-upgrade"
|
||||
defaultMode: 0744
|
||||
- name: default-config
|
||||
configMap:
|
||||
name: nextcloud-configmap
|
||||
items:
|
||||
- key: "000-default.conf"
|
||||
path: "000-default.conf"
|
||||
- name: cli-php-config
|
||||
configMap:
|
||||
name: nextcloud-configmap
|
||||
items:
|
||||
- key: "cli.php.ini"
|
||||
path: "cli.php.ini"
|
||||
- name: apcu-php-config
|
||||
configMap:
|
||||
name: nextcloud-configmap
|
||||
items:
|
||||
- key: "apcu.ini"
|
||||
path: "apcu.ini"
|
||||
- name: apache-php-config
|
||||
configMap:
|
||||
name: nextcloud-configmap
|
||||
items:
|
||||
- key: "apache.php.ini"
|
||||
path: "apache.php.ini"
|
||||
- name: cli-php-config
|
||||
configMap:
|
||||
name: nextcloud-configmap
|
||||
items:
|
||||
- key: "cli.php.ini"
|
||||
path: "cli.php.ini"
|
||||
- name: hugepage
|
||||
|
|
14
customers/base/script-configmap.yml
Normal file
14
customers/base/script-configmap.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: script-configmap
|
||||
data:
|
||||
nc-upgrade.sh: |
|
||||
#!/bin/bash
|
||||
sed "s/config_is_read_only\(.\) => true,/config_is_read_only\1 => false,/" /var/www/html/config/config.php > /var/www/html/config/config.php.tmp
|
||||
mv /var/www/html/config/config.php.tmp /var/www/html/config/config.php
|
||||
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ upgrade
|
||||
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ maintenance:repair
|
||||
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ maintenance:mode --off
|
||||
sed "s/config_is_read_only\(.\) => false,/config_is_read_only\1 => true,/" /var/www/html/config/config.php > /var/www/html/config/config.php.tmp
|
||||
mv /var/www/html/config/config.php.tmp /var/www/html/config/config.php
|
Loading…
Reference in a new issue