Skip to content

Commit

Permalink
to_nice_json
Browse files Browse the repository at this point in the history
  • Loading branch information
Smaine Kahlouch committed Jan 27, 2016
1 parent 0f9cda3 commit a03a14c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
20 changes: 10 additions & 10 deletions templates/postgres-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ apiVersion: v1
kind: ReplicationController
metadata:
name: {{ postgres.name }}
labels: {{ postgres_labels }}
labels: {{ postgres_labels | to_nice_json}}
spec:
replicas: {{ postgres.replicas|default(1) }}
selector: {{ postgres_selector|default(postgres_labels) }}
selector: {{ postgres_selector|default(postgres_labels) | to_nice_json }}
template:
metadata:
labels: {{ postgres_labels }}
labels: {{ postgres_labels | to_nice_json}}
spec:
containers:
- name: postgres
Expand All @@ -31,25 +31,25 @@ spec:
{% endfor %}
{% endif %}
{% if postgres_container_command is defined %}
command: {{ postgres_container_command }}
command: {{ postgres_container_command | to_nice_json }}
{% endif %}
{% if postgres_container_args is defined %}
args: {{ postgres_container_args }}
args: {{ postgres_container_args | to_nice_json }}
{% endif %}
{% if postgres_container_volumemounts is defined %}
volumeMounts: {{ postgres_container_volumemounts }}
volumeMounts: {{ postgres_container_volumemounts | to_nice_json }}
{% endif %}
{% if postgres_container_ports is defined %}
ports: {{ postgres_container_ports }}
ports: {{ postgres_container_ports | to_nice_json }}
{% endif %}
{% if postgres_container_livenessprobe is defined %}
livenessProbe: {{ postgres_container_livenessprobe }}
livenessProbe: {{ postgres_container_livenessprobe | to_nice_json }}
{% endif %}
{% if postgres_container_readinessprobe is defined %}
readinessProbe: {{ postgres_container_readinessprobe }}
readinessProbe: {{ postgres_container_readinessprobe | to_nice_json }}
{% endif %}
{% if postgres_volumes is defined %}
volumes: {{ postgres_volumes|to_json }}
volumes: {{ postgres_volumes | to_nice_json }}
{% endif %}
{% if postgres_nodeselector is defined %}
nodeSelector: {{ postgres_nodeselector }}
Expand Down
14 changes: 7 additions & 7 deletions templates/postgres-slave-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,25 @@ spec:
{% endfor %}
{% endif %}
{% if postgres_slave_container_command is defined %}
command: {{ postgres_slave_container_command }}
command: {{ postgres_slave_container_command | to_nice_json }}
{% endif %}
{% if postgres_slave_container_args is defined %}
args: {{ postgres_slave_container_args }}
args: {{ postgres_slave_container_args | to_nice_json }}
{% endif %}
{% if postgres_slave_container_volumemounts is defined %}
volumeMounts: {{ postgres_slave_container_volumemounts }}
volumeMounts: {{ postgres_slave_container_volumemounts | to_nice_json }}
{% endif %}
{% if postgres_container_ports is defined %}
ports: {{ postgres_container_ports }}
ports: {{ postgres_container_ports | to_nice_json }}
{% endif %}
{% if postgres_container_livenessprobe is defined %}
livenessProbe: {{ postgres_container_livenessprobe }}
livenessProbe: {{ postgres_container_livenessprobe | to_nice_json }}
{% endif %}
{% if postgres_container_readinessprobe is defined %}
readinessProbe: {{ postgres_container_readinessprobe }}
readinessProbe: {{ postgres_container_readinessprobe | to_nice_json }}
{% endif %}
{% if postgres_slave_volumes is defined %}
volumes: {{ postgres_slave_volumes|to_json }}
volumes: {{ postgres_slave_volumes | to_nice_json }}
{% endif %}
{% if postgres_nodeselector is defined %}
nodeSelector: {{ postgres_nodeselector }}
Expand Down
4 changes: 2 additions & 2 deletions templates/postgres-svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apiVersion: "v1"
kind: "Service"
metadata:
name: {{ postgres.name }}
labels: {{ postgres_labels }}
labels: {{ postgres_labels | to_nice_json }}
spec:
{% if postgres.type is defined %}
type: {{ postgres.type }}
{% endif %}
selector: {{ postgres_selector|default(postgres_labels) }}
selector: {{ postgres_selector|default(postgres_labels) | to_nice_json }}
{% if postgres_clusterIP is defined %}
clusterIP: {{ postgres_clusterIP }}
{% endif %}
Expand Down

0 comments on commit a03a14c

Please sign in to comment.