testing just using an emptyDir for rendered config (+more) #1
21 changed files with 248 additions and 189 deletions
35
applications/richir-test/application.yaml
Normal file
35
applications/richir-test/application.yaml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: richir-test
|
||||||
|
namespace: argocd
|
||||||
|
labels:
|
||||||
|
name: richir-test
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
sources:
|
||||||
|
- repoURL: 'https://platform.sunet.se/Drive/k8s-manifests'
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: customers/overlays/richir/test/
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: richir
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: false
|
||||||
|
selfHeal: true
|
||||||
|
allowEmpty: false
|
||||||
|
syncOptions: # maybe needs FIXME
|
||||||
|
- Validate=true # disables resource validation (equivalent to 'kubectl apply --validate=false') ( true by default ).
|
||||||
|
- CreateNamespace=true # Namespace Auto-Creation ensures that namespace specified as the application destination exists in the destination cluster.
|
||||||
|
- PrunePropagationPolicy=foreground # Supported policies are background, foreground and orphan.
|
||||||
|
- PruneLast=true # Allow the ability for resource pruning to happen as a final, implicit wave of a sync operation
|
||||||
|
- RespectIgnoreDifferences=true # When syncing changes, respect fields ignored by the ignoreDifferences configuration
|
||||||
|
- ApplyOutOfSyncOnly=true # Only sync out-of-sync resources, rather than applying every object in the application
|
||||||
|
retry:
|
||||||
|
limit: 5
|
||||||
|
backoff:
|
||||||
|
duration: 5s
|
||||||
|
factor: 2
|
||||||
|
maxDuration: 3m
|
||||||
|
revisionHistoryLimit: 2
|
45
applicationsets/applicationset.yaml
Normal file
45
applicationsets/applicationset.yaml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: ApplicationSet
|
||||||
|
metadata:
|
||||||
|
name: customer-applications
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
goTemplate: true
|
||||||
|
goTemplateOptions: ["missingkey=error"]
|
||||||
|
generators:
|
||||||
|
- git:
|
||||||
|
repoURL: 'https://platform.sunet.se/Drive/k8s-manifests'
|
||||||
|
revision: HEAD
|
||||||
|
directories:
|
||||||
|
- path: 'customers/overlays/*'
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
name: '{{index .path.segments 2}}-{{index .path.segments 3}}'
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: 'https://platform.sunet.se/Drive/k8s-manifests'
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: 'customers/overlays/{{index .path.segments 2}}'
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: '{{index .path.segments 2}}'
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: false
|
||||||
|
selfHeal: true
|
||||||
|
allowEmpty: false
|
||||||
|
syncOptions: # maybe needs FIXME
|
||||||
|
- Validate=true # disables resource validation (equivalent to 'kubectl apply --validate=false') ( true by default ).
|
||||||
|
- CreateNamespace=true # Namespace Auto-Creation ensures that namespace specified as the application destination exists in the destination cluster.
|
||||||
|
- PrunePropagationPolicy=foreground # Supported policies are background, foreground and orphan.
|
||||||
|
- PruneLast=true # Allow the ability for resource pruning to happen as a final, implicit wave of a sync operation
|
||||||
|
- RespectIgnoreDifferences=true # When syncing changes, respect fields ignored by the ignoreDifferences configuration
|
||||||
|
- ApplyOutOfSyncOnly=true # Only sync out-of-sync resources, rather than applying every object in the application
|
||||||
|
retry:
|
||||||
|
limit: 5
|
||||||
|
backoff:
|
||||||
|
duration: 5s
|
||||||
|
factor: 2
|
||||||
|
maxDuration: 3m
|
||||||
|
revisionHistoryLimit: 2
|
|
@ -10,9 +10,12 @@ data:
|
||||||
ServerAdmin webmaster@localhost
|
ServerAdmin webmaster@localhost
|
||||||
DocumentRoot /var/www/html
|
DocumentRoot /var/www/html
|
||||||
# Log format config
|
# Log format config
|
||||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" common
|
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" xforwardedfor
|
||||||
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
|
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
|
||||||
|
|
||||||
|
PassEnv HOSTNAME
|
||||||
|
Header append Set-Cookie "SERVERID=%{HOSTNAME}e;Path=/;SameSite=Lax;HttpOnly;Secure"
|
||||||
|
|
||||||
# Header config
|
# Header config
|
||||||
RemoteIPHeader X-Forwarded-For
|
RemoteIPHeader X-Forwarded-For
|
||||||
RemoteIPInternalProxy 37.156.195.14
|
RemoteIPInternalProxy 37.156.195.14
|
||||||
|
@ -21,10 +24,8 @@ data:
|
||||||
RemoteIPInternalProxy 37.156.195.92
|
RemoteIPInternalProxy 37.156.195.92
|
||||||
#ErrorDocument 404 /404.html
|
#ErrorDocument 404 /404.html
|
||||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
CustomLog ${APACHE_LOG_DIR}/access.log combined env=forwarded
|
CustomLog ${APACHE_LOG_DIR}/access.log xforwardedfor env=forwarded
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/access.log combined env=!forwarded
|
||||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
||||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|
||||||
<Directory /var/www/html/>
|
<Directory /var/www/html/>
|
||||||
LimitRequestBody 0
|
LimitRequestBody 0
|
||||||
Require all granted
|
Require all granted
|
||||||
|
@ -40,9 +41,12 @@ data:
|
||||||
ServerAdmin webmaster@localhost
|
ServerAdmin webmaster@localhost
|
||||||
DocumentRoot /var/www/html
|
DocumentRoot /var/www/html
|
||||||
# Log format config
|
# Log format config
|
||||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" common
|
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" xforwardedfor
|
||||||
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
|
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
|
||||||
|
|
||||||
|
PassEnv HOSTNAME
|
||||||
|
Header append Set-Cookie "SERVERID=%{HOSTNAME}e;Path=/;SameSite=Lax;HttpOnly;Secure"
|
||||||
|
|
||||||
# Header config
|
# Header config
|
||||||
RemoteIPHeader X-Forwarded-For
|
RemoteIPHeader X-Forwarded-For
|
||||||
RemoteIPInternalProxy 37.156.195.14
|
RemoteIPInternalProxy 37.156.195.14
|
||||||
|
@ -51,7 +55,8 @@ data:
|
||||||
RemoteIPInternalProxy 37.156.195.92
|
RemoteIPInternalProxy 37.156.195.92
|
||||||
#ErrorDocument 404 /404.html
|
#ErrorDocument 404 /404.html
|
||||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
CustomLog ${APACHE_LOG_DIR}/access.log combined env=forwarded
|
CustomLog ${APACHE_LOG_DIR}/access.log xforwardedfor env=forwarded
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/access.log combined env=!forwarded
|
||||||
SSLEngine On
|
SSLEngine On
|
||||||
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
|
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
|
||||||
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
|
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
|
||||||
|
|
26
customers/base/env-configmap.yml
Normal file
26
customers/base/env-configmap.yml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: nextcloud-env
|
||||||
|
data:
|
||||||
|
GSS_MASTER_URL: 'https://drive.test.sunet.se'
|
||||||
|
LOOKUP_SERVER: 'https://lookup.drive.test.sunet.se'
|
||||||
|
MAIL_DOMAIN: 'drive.test.sunet.se'
|
||||||
|
MAIL_FROM_ADDRESS: 'noreply'
|
||||||
|
MAIL_SMTPHOST: 'smtp.sunet.se'
|
||||||
|
MAIL_SMTPNAME: 'noreply@drive.test.sunet.se'
|
||||||
|
MYSQL_DATABASE: 'nextcloud_customer'
|
||||||
|
MYSQL_HOST: 'proxysqlcluster.proxysql'
|
||||||
|
MYSQL_PORT: '6033'
|
||||||
|
MYSQL_USER: 'nextcloud_customer'
|
||||||
|
NEXTCLOUD_ADMIN_USER: 'admin'
|
||||||
|
NEXTCLOUD_TRUSTED_DOMAINS: 'customer.drive.test.sunet.se'
|
||||||
|
NEXTCLOUD_VERSION_STRING: '30.0.5.2'
|
||||||
|
OBJECTSTORE_S3_AUTOCREATE: 'true'
|
||||||
|
OBJECTSTORE_S3_BUCKET: 'primary-customer-drive-test.sunet.se'
|
||||||
|
OBJECTSTORE_S3_HOST: 's3.sto4.safedc.net'
|
||||||
|
OBJECTSTORE_S3_REGION: 'us-east-1'
|
||||||
|
OBJECTSTORE_S3_SSL: 'true'
|
||||||
|
OBJECTSTORE_S3_USEPATH_STYLE: 'true'
|
||||||
|
REDIS_HOST: 'redis'
|
||||||
|
SITE_NAME: 'customer.drive.test.sunet.se'
|
|
@ -3,6 +3,7 @@ resources:
|
||||||
- apache-php-configmap.yml
|
- apache-php-configmap.yml
|
||||||
- apcu-configmap.yml
|
- apcu-configmap.yml
|
||||||
- cli-php-configmap.yml
|
- cli-php-configmap.yml
|
||||||
|
- env-configmap.yml
|
||||||
- nextcloud-cert-issuer.yml
|
- nextcloud-cert-issuer.yml
|
||||||
- nextcloud-configmap.yml
|
- nextcloud-configmap.yml
|
||||||
- nextcloud-deployment.yml
|
- nextcloud-deployment.yml
|
||||||
|
@ -12,3 +13,8 @@ resources:
|
||||||
- redis-service.yml
|
- redis-service.yml
|
||||||
- s3-service.yml
|
- s3-service.yml
|
||||||
- script-configmap.yml
|
- script-configmap.yml
|
||||||
|
|
||||||
|
images:
|
||||||
|
- name: nextcloud-custom-image
|
||||||
|
newName: docker.sunet.se/drive/nextcloud-custom
|
||||||
|
newTag: 30.0.5.2-2
|
||||||
|
|
|
@ -45,6 +45,7 @@ data:
|
||||||
'gss.master.url' => '{{GSS_MASTER_URL}}',
|
'gss.master.url' => '{{GSS_MASTER_URL}}',
|
||||||
'gss.mode' => 'slave',
|
'gss.mode' => 'slave',
|
||||||
'gss.user.discovery.module' => '\\OCA\\GlobalSiteSelector\\UserDiscoveryModules\\ManualUserMapping',
|
'gss.user.discovery.module' => '\\OCA\\GlobalSiteSelector\\UserDiscoveryModules\\ManualUserMapping',
|
||||||
|
'htaccess.RewriteBase' => '/',
|
||||||
'installed' => true,
|
'installed' => true,
|
||||||
'instanceid' => '{{NEXTCLOUD_INSTANCEID}}',
|
'instanceid' => '{{NEXTCLOUD_INSTANCEID}}',
|
||||||
'integrity.check.disabled' => true,
|
'integrity.check.disabled' => true,
|
||||||
|
@ -85,7 +86,7 @@ data:
|
||||||
'use_ssl' => true,
|
'use_ssl' => true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'overwrite.cli.url' => 'https://{{SITE_NAME}}',
|
'overwrite.cli.url' => 'https://{{SITE_NAME}}/',
|
||||||
'overwritehost' => '{{SITE_NAME}}',
|
'overwritehost' => '{{SITE_NAME}}',
|
||||||
'overwriteprotocol' => 'https',
|
'overwriteprotocol' => 'https',
|
||||||
'passwordsalt' => '{{NEXTCLOUD_PASSWORDSALT}}',
|
'passwordsalt' => '{{NEXTCLOUD_PASSWORDSALT}}',
|
||||||
|
|
|
@ -11,16 +11,6 @@ spec:
|
||||||
app: customer-node
|
app: customer-node
|
||||||
updateStrategy:
|
updateStrategy:
|
||||||
type: RollingUpdate
|
type: RollingUpdate
|
||||||
volumeClaimTemplates:
|
|
||||||
- metadata:
|
|
||||||
name: nextcloud-data
|
|
||||||
spec:
|
|
||||||
storageClassName: csi-sc-cinderplugin
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 1Gi
|
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
|
@ -28,9 +18,25 @@ spec:
|
||||||
kano: micke
|
kano: micke
|
||||||
spec:
|
spec:
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
|
initContainers:
|
||||||
|
- image: docker.sunet.se/sunet/docker-jinja:latest
|
||||||
|
name: init-config
|
||||||
|
volumeMounts:
|
||||||
|
- name: nextcloud-config
|
||||||
|
mountPath: /tmp/config.php.template
|
||||||
|
subPath: config.php
|
||||||
|
- name: nextcloud-data
|
||||||
|
mountPath: /var/www/html/config
|
||||||
|
subPath: config
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: nextcloud-env
|
||||||
|
- secretRef:
|
||||||
|
name: nextcloud-secrets
|
||||||
|
command: ["/bin/bash", "-c", "/usr/bin/j2 -f env -o /var/www/html/config/config.php /tmp/config.php.template"]
|
||||||
containers:
|
containers:
|
||||||
- name: customer
|
- name: customer
|
||||||
image: docker.sunet.se/drive/nextcloud-custom:30.0.5.2-2
|
image: nextcloud-custom-image
|
||||||
Micke marked this conversation as resolved
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: nextcloud-data
|
- name: nextcloud-data
|
||||||
mountPath: /var/www/html/config/
|
mountPath: /var/www/html/config/
|
||||||
|
@ -76,105 +82,6 @@ spec:
|
||||||
postStart:
|
postStart:
|
||||||
exec:
|
exec:
|
||||||
command: ["/bin/bash", "-c", "/usr/local/bin/nc-upgrade"]
|
command: ["/bin/bash", "-c", "/usr/local/bin/nc-upgrade"]
|
||||||
initContainers:
|
|
||||||
- image: docker.sunet.se/sunet/docker-jinja:latest
|
|
||||||
name: init-config
|
|
||||||
volumeMounts:
|
|
||||||
- name: nextcloud-config
|
|
||||||
mountPath: /tmp/config.php.template
|
|
||||||
subPath: config.php
|
|
||||||
- name: nextcloud-data
|
|
||||||
mountPath: /var/www/html/config
|
|
||||||
subPath: config
|
|
||||||
env:
|
|
||||||
- name: GSS_MASTER_URL
|
|
||||||
value: "https://drive.test.sunet.se"
|
|
||||||
- name: GSS_JWT_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: gss-secret
|
|
||||||
key: "jwt_key"
|
|
||||||
- name: LOOKUP_SERVER
|
|
||||||
value: "https://lookup.drive.test.sunet.se"
|
|
||||||
- name: MAIL_DOMAIN
|
|
||||||
value: "drive.test.sunet.se"
|
|
||||||
- name: MAIL_FROM_ADDRESS
|
|
||||||
value: "noreply"
|
|
||||||
- name: MAIL_SMTPHOST
|
|
||||||
value: "smtp.sunet.se"
|
|
||||||
- name: MAIL_SMTPNAME
|
|
||||||
value: "noreply@drive.test.sunet.se"
|
|
||||||
- name: MAIL_SMTPPASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: mail-secret
|
|
||||||
key: "smtp_password"
|
|
||||||
- name: MYSQL_DATABASE
|
|
||||||
value: "nextcloud_customer"
|
|
||||||
- name: MYSQL_USER
|
|
||||||
value: "nextcloud_customer"
|
|
||||||
- name: MYSQL_HOST
|
|
||||||
value: "proxysqlcluster.proxysql"
|
|
||||||
- name: MYSQL_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: db-secret
|
|
||||||
key: "db_password"
|
|
||||||
- name: MYSQL_PORT
|
|
||||||
value: "6033"
|
|
||||||
- name: NEXTCLOUD_TRUSTED_DOMAINS
|
|
||||||
value: "customer.drive.test.sunet.se"
|
|
||||||
- name: NEXTCLOUD_ADMIN_USER
|
|
||||||
value: admin
|
|
||||||
- name: NEXTCLOUD_VERSION_STRING
|
|
||||||
value: "30.0.5.2"
|
|
||||||
- name: NEXTCLOUD_ADMIN_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: nc-secret
|
|
||||||
key: "nc_admin_password"
|
|
||||||
- name: NEXTCLOUD_PASSWORDSALT
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: nc-secret
|
|
||||||
key: "nc_passwordsalt"
|
|
||||||
- name: NEXTCLOUD_INSTANCEID
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: nc-secret
|
|
||||||
key: "nc_instanceid"
|
|
||||||
- name: NEXTCLOUD_SECRET
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: nc-secret
|
|
||||||
key: "nc_secret"
|
|
||||||
- name: OBJECTSTORE_S3_REGION
|
|
||||||
value: "us-east-1"
|
|
||||||
- name: OBJECTSTORE_S3_HOST
|
|
||||||
value: "s3.sto4.safedc.net"
|
|
||||||
- name: OBJECTSTORE_S3_BUCKET
|
|
||||||
value: "primary-customer-drive-test.sunet.se"
|
|
||||||
- name: OBJECTSTORE_S3_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: s3-secret
|
|
||||||
key: "s3_key"
|
|
||||||
- name: OBJECTSTORE_S3_SECRET
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: s3-secret
|
|
||||||
key: "s3_secret"
|
|
||||||
- name: OBJECTSTORE_S3_USEPATH_STYLE
|
|
||||||
value: "true"
|
|
||||||
- name: OBJECTSTORE_S3_AUTOCREATE
|
|
||||||
value: "true"
|
|
||||||
- name: OBJECTSTORE_S3_SSL
|
|
||||||
value: "true"
|
|
||||||
- name: REDIS_HOST
|
|
||||||
value: "redis"
|
|
||||||
- name: SITE_NAME
|
|
||||||
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:
|
volumes:
|
||||||
- name: script-config
|
- name: script-config
|
||||||
configMap:
|
configMap:
|
||||||
|
@ -213,3 +120,5 @@ spec:
|
||||||
items:
|
items:
|
||||||
- key: "config.php"
|
- key: "config.php"
|
||||||
path: "config.php"
|
path: "config.php"
|
||||||
|
- name: nextcloud-data
|
||||||
|
emptyDir: {}
|
||||||
|
|
|
@ -6,6 +6,11 @@ metadata:
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/issuer: "letsencrypt"
|
cert-manager.io/issuer: "letsencrypt"
|
||||||
acme.cert-manager.io/http01-edit-in-place: "true"
|
acme.cert-manager.io/http01-edit-in-place: "true"
|
||||||
|
nginx.ingress.kubernetes.io/affinity-mode: "persistent"
|
||||||
|
nginx.ingress.kubernetes.io/affinity: "cookie"
|
||||||
|
nginx.ingress.kubernetes.io/session-cookie-expires: "172800"
|
||||||
|
nginx.ingress.kubernetes.io/session-cookie-max-age: "172800"
|
||||||
|
nginx.ingress.kubernetes.io/session-cookie-name: "sticky"
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: nginx
|
ingressClassName: nginx
|
||||||
defaultBackend:
|
defaultBackend:
|
||||||
|
@ -17,7 +22,6 @@ spec:
|
||||||
- hosts:
|
- hosts:
|
||||||
- customer.drive.test.sunet.se
|
- customer.drive.test.sunet.se
|
||||||
secretName: tls-secret
|
secretName: tls-secret
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- host: customer.drive.test.sunet.se
|
- host: customer.drive.test.sunet.se
|
||||||
http:
|
http:
|
||||||
|
|
|
@ -8,6 +8,7 @@ data:
|
||||||
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
|
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
|
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 upgrade
|
||||||
|
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ maintenance:update:htaccess
|
||||||
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:repair
|
||||||
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ maintenance:mode --off
|
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ maintenance:mode --off
|
||||||
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ db:add-missing-primary-keys
|
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ db:add-missing-primary-keys
|
||||||
|
|
11
customers/overlays/nordunet/test/env-configmap.yml
Normal file
11
customers/overlays/nordunet/test/env-configmap.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: nextcloud-env
|
||||||
|
data:
|
||||||
|
MYSQL_DATABASE: 'nextcloud_nordunet'
|
||||||
|
MYSQL_USER: 'nextcloud_nordunet'
|
||||||
|
NEXTCLOUD_TRUSTED_DOMAINS: 'nordunet.drive.test.sunet.se'
|
||||||
|
OBJECTSTORE_S3_BUCKET: 'primary-nordunet-drive-test.sunet.se'
|
||||||
|
REDIS_HOST: 'nordunet-redis'
|
||||||
|
SITE_NAME: 'nordunet.drive.test.sunet.se'
|
|
@ -1,7 +1,9 @@
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- ../../../base
|
- ../../../base
|
||||||
patches:
|
patches:
|
||||||
- path: nextcloud-deployment.yml
|
- path: env-configmap.yml
|
||||||
- path: nextcloud-ingress.yml
|
- path: nextcloud-deployment.yml
|
||||||
|
- path: nextcloud-ingress.yml
|
||||||
|
namePrefix: 'nordunet-'
|
||||||
lasse marked this conversation as resolved
Outdated
lasse
commented
Jag är inte säker på att nameprefix är en bra idé. Alla resurser skapas ju i separata namespaces för varje kund, så det blir lite redundant. Jag är inte säker på att nameprefix är en bra idé. Alla resurser skapas ju i separata namespaces för varje kund, så det blir lite redundant.
|
|||||||
|
|
|
@ -6,30 +6,3 @@ metadata:
|
||||||
app: customer-node
|
app: customer-node
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: customer-node
|
|
||||||
spec:
|
|
||||||
initContainers:
|
|
||||||
- image: docker.sunet.se/sunet/docker-jinja:latest
|
|
||||||
name: init-config
|
|
||||||
env:
|
|
||||||
- name: MYSQL_DATABASE
|
|
||||||
value: "nextcloud_nordunet"
|
|
||||||
- name: MYSQL_USER
|
|
||||||
value: "nextcloud_nordunet"
|
|
||||||
- name: GSS_MASTER_URL
|
|
||||||
value: "https://drive.test.sunet.se"
|
|
||||||
- name: LOOKUP_SERVER
|
|
||||||
value: "https://lookup.drive.test.sunet.se"
|
|
||||||
- name: MAIL_DOMAIN
|
|
||||||
value: "drive.test.sunet.se"
|
|
||||||
- name: MAIL_SMTPNAME
|
|
||||||
value: "noreply@drive.test.sunet.se"
|
|
||||||
- name: NEXTCLOUD_TRUSTED_DOMAINS
|
|
||||||
value: "nordunet.drive.test.sunet.se"
|
|
||||||
- name: OBJECTSTORE_S3_BUCKET
|
|
||||||
value: "primary-nordunet-drive-test.sunet.se"
|
|
||||||
- name: SITE_NAME
|
|
||||||
value: "nordunet.drive.test.sunet.se"
|
|
||||||
|
|
11
customers/overlays/richir/test/env-configmap.yml
Normal file
11
customers/overlays/richir/test/env-configmap.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: nextcloud-env
|
||||||
|
data:
|
||||||
|
MYSQL_DATABASE: 'nextcloud_richir'
|
||||||
|
MYSQL_USER: 'nextcloud_richir'
|
||||||
|
NEXTCLOUD_TRUSTED_DOMAINS: 'richir.drive.test.sunet.se'
|
||||||
|
OBJECTSTORE_S3_BUCKET: 'primary-richir-drive-test.sunet.se'
|
||||||
|
REDIS_HOST: 'richir-redis'
|
||||||
|
SITE_NAME: 'richir.drive.test.sunet.se'
|
9
customers/overlays/richir/test/kustomization.yaml
Normal file
9
customers/overlays/richir/test/kustomization.yaml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ../../../base
|
||||||
|
patches:
|
||||||
|
- path: env-configmap.yml
|
||||||
|
- path: nextcloud-deployment.yml
|
||||||
|
- path: nextcloud-ingress.yml
|
||||||
|
namePrefix: 'richir-'
|
8
customers/overlays/richir/test/nextcloud-deployment.yml
Normal file
8
customers/overlays/richir/test/nextcloud-deployment.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
kind: StatefulSet
|
||||||
|
apiVersion: apps/v1
|
||||||
|
metadata:
|
||||||
|
name: customer-node
|
||||||
|
labels:
|
||||||
|
app: customer-node
|
||||||
|
spec:
|
||||||
|
replicas: 2
|
26
customers/overlays/richir/test/nextcloud-ingress.yml
Normal file
26
customers/overlays/richir/test/nextcloud-ingress.yml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: customer-ingress
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/issuer: "letsencrypt"
|
||||||
|
acme.cert-manager.io/http01-edit-in-place: "true"
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- richir.drive.test.sunet.se
|
||||||
|
secretName: tls-secret
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: richir.drive.test.sunet.se
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: customer-node
|
||||||
|
port:
|
||||||
|
number: 80
|
11
customers/overlays/vinnova/test/env-configmap.yml
Normal file
11
customers/overlays/vinnova/test/env-configmap.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: nextcloud-env
|
||||||
|
data:
|
||||||
|
MYSQL_DATABASE: 'nextcloud_vinnova'
|
||||||
|
MYSQL_USER: 'nextcloud_vinnova'
|
||||||
|
NEXTCLOUD_TRUSTED_DOMAINS: 'vinnova.drive.test.sunet.se'
|
||||||
|
OBJECTSTORE_S3_BUCKET: 'primary-vinnova-test.sunet.se'
|
||||||
|
REDIS_HOST: 'vinnova-redis'
|
||||||
|
SITE_NAME: 'vinnova.drive.test.sunet.se'
|
|
@ -1,7 +1,9 @@
|
||||||
apiVersion: 'kustomize.config.k8s.io/v1beta1'
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
bases:
|
resources:
|
||||||
- ../../../base
|
- ../../../base
|
||||||
patchesStrategicMerge:
|
patches:
|
||||||
- nextcloud-deployment.yml
|
- path: env-configmap.yml
|
||||||
- nextcloud-ingress.yml
|
- path: nextcloud-deployment.yml
|
||||||
|
- path: nextcloud-ingress.yml
|
||||||
|
namePrefix: 'vinnova-'
|
||||||
|
|
|
@ -5,30 +5,4 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
app: customer-node
|
app: customer-node
|
||||||
spec:
|
spec:
|
||||||
template:
|
replicas: 1
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: customer-node
|
|
||||||
spec:
|
|
||||||
initContainers:
|
|
||||||
- image: docker.sunet.se/sunet/docker-jinja:latest
|
|
||||||
name: init-config
|
|
||||||
env:
|
|
||||||
- name: MYSQL_DATABASE
|
|
||||||
value: "nextcloud_vinnova"
|
|
||||||
- name: MYSQL_USER
|
|
||||||
value: "nextcloud_vinnova"
|
|
||||||
- name: GSS_MASTER_URL
|
|
||||||
value: "https://drive.test.sunet.se"
|
|
||||||
- name: LOOKUP_SERVER
|
|
||||||
value: "https://lookup.drive.test.sunet.se"
|
|
||||||
- name: MAIL_DOMAIN
|
|
||||||
value: "drive.test.sunet.se"
|
|
||||||
- name: MAIL_SMTPNAME
|
|
||||||
value: "noreply@drive.test.sunet.se"
|
|
||||||
- name: NEXTCLOUD_TRUSTED_DOMAINS
|
|
||||||
value: "vinnova.drive.test.sunet.se"
|
|
||||||
- name: OBJECTSTORE_S3_BUCKET
|
|
||||||
value: "primary-vinnova-test.sunet.se"
|
|
||||||
- name: SITE_NAME
|
|
||||||
value: "vinnova.drive.test.sunet.se"
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue
What image is this?
Found it! It is defined in kustomization.yaml