Skip to content

Commit

Permalink
Finish Helm Chart for cloud-server
Browse files Browse the repository at this point in the history
  • Loading branch information
lots0logs committed May 20, 2020
1 parent d4ca0cc commit 0dbd3a2
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/cloud-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ maintainers:
- email: [email protected]
name: Elegant Themes
name: cloud-server
version: 0.0.2
version: 0.0.3
1 change: 1 addition & 0 deletions charts/cloud-server/app-readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Cloud Server
3 changes: 3 additions & 0 deletions charts/cloud-server/questions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
questions:
# - variable: s3_bucket_name
# label: S3 Bucket Name
6 changes: 6 additions & 0 deletions charts/cloud-server/templates/cloud-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ spec:
volumeMounts:
- name: workspace
mountPath: /workspace
- name: config
mountPath: /config
readOnly: true
volumes:
- name: workspace
emptyDir: {}
- name: config
secret:
secretName: wp-config
5 changes: 2 additions & 3 deletions charts/cloud-server/templates/ingress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ data:
SERVER_PORT: $server_port
SERVER_NAME: $server_name
REDIRECT_STATUS: "200"

---

apiVersion: networking.k8s.io/v1beta1
Expand All @@ -46,10 +45,10 @@ metadata:
spec:
tls:
- hosts:
- cloud.staging.etdevs.com
- {{ .Values.VIRTUAL_HOST }}
secretName: cloud-server-tls
rules:
- host: cloud.staging.etdevs.com
- host: {{ .Values.VIRTUAL_HOST }}
http:
paths:
- path: ^(/api/[^/]+)?(/wp-.*)
Expand Down
50 changes: 50 additions & 0 deletions charts/cloud-server/templates/wp-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
apiVersion: v1
kind: Secret
metadata:
name: wp-config
namespace: cloud-server
stringData:
ADMIN_USER: {{ .Values.ADMIN_USER }}
ADMIN_PASSWORD: {{ .Values.ADMIN_PASSWORD }}
ADMIN_EMAIL: {{ .Values.ADMIN_EMAIL }}
wp-config.php: |
<?php
define( 'DB_NAME', '{{ .Values.DB_NAME }}' );
define( 'DB_USER', '{{ .Values.DB_USER }}' );
define( 'DB_PASSWORD', '{{ .Values.DB_PASSWORD }}' );
define( 'DB_HOST', '{{ .Values.DB_HOST }}' );
define( 'DB_CHARSET', 'utf8' );
define( 'DB_COLLATE', '' );
define( 'AUTH_KEY', '{{ .Values.AUTH_KEY }}' );
define( 'SECURE_AUTH_KEY', '{{ .Values.SECURE_AUTH_KEY }}' );
define( 'LOGGED_IN_KEY', '{{ .Values.LOGGED_IN_KEY }}' );
define( 'NONCE_KEY', '{{ .Values.NONCE_KEY }}' );
define( 'AUTH_SALT', '{{ .Values.AUTH_SALT }}' );
define( 'SECURE_AUTH_SALT', '{{ .Values.SECURE_AUTH_SALT }}' );
define( 'LOGGED_IN_SALT', '{{ .Values.LOGGED_IN_SALT }}' );
define( 'NONCE_SALT', '{{ .Values.NONCE_SALT }}' );
if ( false !== strpos( getenv( 'VIRTUAL_HOST' ), 'staging' ) ) {
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
}
define( 'WP_ALLOW_MULTISITE', true );
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', false );
$base = '/api';
define( 'DOMAIN_CURRENT_SITE', getenv( 'VIRTUAL_HOST' ) );
define( 'PATH_CURRENT_SITE', '/api' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', dirname( __FILE__ ) . '/' );
}
/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';
20 changes: 20 additions & 0 deletions charts/cloud-server/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
DB_NAME:
DB_USER:
DB_PASSWORD:
DB_HOST:

AUTH_KEY:
SECURE_AUTH_KEY:
LOGGED_IN_KEY:
NONCE_KEY:
AUTH_SALT:
SECURE_AUTH_SALT:
LOGGED_IN_SALT:
NONCE_SALT:

ADMIN_USER:
ADMIN_PASSWORD:
ADMIN_EMAIL:

VIRTUAL_HOST:
VIRTUAL_ROOT:

0 comments on commit 0dbd3a2

Please sign in to comment.