mirror of https://github.com/helm/helm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
2.7 KiB
72 lines
2.7 KiB
9 years ago
|
{% set PROPERTIES = properties or {} %}
|
||
|
{% set PROJECT = PROPERTIES['project'] or 'dm-k8s-testing' %}
|
||
|
{% set NFS_SERVER = PROPERTIES['nfs-server'] or {} %}
|
||
|
{% set NFS_SERVER_IP = NFS_SERVER['ip'] or '10.0.253.247' %}
|
||
|
{% set NFS_SERVER_PORT = NFS_SERVER['port'] or 2049 %}
|
||
|
{% set NFS_SERVER_DISK = NFS_SERVER['disk'] or 'nfs-disk' %}
|
||
|
{% set NFS_SERVER_DISK_FSTYPE = NFS_SERVER['fstype'] or 'ext4' %}
|
||
|
{% set NGINX = PROPERTIES['nginx'] or {} %}
|
||
|
{% set NGINX_PORT = 80 %}
|
||
|
{% set NGINX_REPLICAS = NGINX['replicas'] or 2 %}
|
||
|
{% set WORDPRESS_PHP = PROPERTIES['wordpress-php'] or {} %}
|
||
|
{% set WORDPRESS_PHP_REPLICAS = WORDPRESS_PHP['replicas'] or 2 %}
|
||
|
{% set WORDPRESS_PHP_PORT = WORDPRESS_PHP['port'] or 9000 %}
|
||
|
{% set MYSQL = PROPERTIES['mysql'] or {} %}
|
||
|
{% set MYSQL_PORT = MYSQL['port'] or 3306 %}
|
||
|
{% set MYSQL_PASSWORD = MYSQL['password'] or 'mysql-password' %}
|
||
|
{% set MYSQL_DISK = MYSQL['disk'] or 'mysql-disk' %}
|
||
|
{% set MYSQL_DISK_FSTYPE = MYSQL['fstype'] or 'ext4' %}
|
||
|
|
||
|
resources:
|
||
|
- name: nfs
|
||
|
type: https://raw.githubusercontent.com/kubernetes/deployment-manager/master/templates/nfs/v1/nfs.jinja
|
||
|
properties:
|
||
|
ip: {{ NFS_SERVER_IP }}
|
||
|
port: {{ NFS_SERVER_PORT }}
|
||
|
disk: {{ NFS_SERVER_DISK }}
|
||
|
fstype: {{NFS_SERVER_DISK_FSTYPE }}
|
||
|
- name: nginx
|
||
|
type: https://raw.githubusercontent.com/kubernetes/deployment-manager/master/templates/replicatedservice/v2/replicatedservice.py
|
||
|
properties:
|
||
|
service_port: {{ NGINX_PORT }}
|
||
|
container_port: {{ NGINX_PORT }}
|
||
|
replicas: {{ NGINX_REPLICAS }}
|
||
|
external_service: true
|
||
|
image: gcr.io/{{ PROJECT }}/nginx:latest
|
||
|
volumes:
|
||
|
- mount_path: /var/www/html
|
||
|
persistentVolumeClaim:
|
||
|
claimName: nfs
|
||
|
- name: mysql
|
||
|
type: https://raw.githubusercontent.com/kubernetes/deployment-manager/master/templates/replicatedservice/v2/replicatedservice.py
|
||
|
properties:
|
||
|
service_port: {{ MYSQL_PORT }}
|
||
|
container_port: {{ MYSQL_PORT }}
|
||
|
replicas: 1
|
||
|
image: mysql:5.6
|
||
|
env:
|
||
|
- name: MYSQL_ROOT_PASSWORD
|
||
|
value: {{ MYSQL_PASSWORD }}
|
||
|
volumes:
|
||
|
- mount_path: /var/lib/mysql
|
||
|
gcePersistentDisk:
|
||
|
pdName: {{ MYSQL_DISK }}
|
||
|
fsType: {{ MYSQL_DISK_FSTYPE }}
|
||
|
- name: wordpress-php
|
||
|
type: https://raw.githubusercontent.com/kubernetes/deployment-manager/master/templates/replicatedservice/v2/replicatedservice.py
|
||
|
properties:
|
||
|
service_name: wordpress-php
|
||
|
service_port: {{ WORDPRESS_PHP_PORT }}
|
||
|
container_port: {{ WORDPRESS_PHP_PORT }}
|
||
|
replicas: 2
|
||
|
image: wordpress:fpm
|
||
|
env:
|
||
|
- name: WORDPRESS_DB_PASSWORD
|
||
|
value: {{ MYSQL_PASSWORD }}
|
||
|
- name: WORDPRESS_DB_HOST
|
||
|
value: mysql-service
|
||
|
volumes:
|
||
|
- mount_path: /var/www/html
|
||
|
persistentVolumeClaim:
|
||
|
claimName: nfs
|