common_volume_mounts and common_containers macros
Two new macros for further code optimization TrivialFix Change-Id: I4f3995579039862a5b3422ce1db4b2b7af0d5a47
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
{%- set resourceName = kolla_kubernetes.cli.args.resource_name %}
|
||||
{%- import "services/common/common-lib.yml.j2" as lib with context %}
|
||||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
spec:
|
||||
@@ -18,11 +20,9 @@ spec:
|
||||
- image: "{{ memcached_image_full }}"
|
||||
name: main
|
||||
volumeMounts:
|
||||
{{ lib.common_volume_mounts(indent=12) }}
|
||||
- mountPath: {{ container_config_directory }}
|
||||
name: memcached-config
|
||||
- mountPath: /etc/localtime
|
||||
name: host-etc-localtime
|
||||
readOnly: true
|
||||
env:
|
||||
- name: KOLLA_CONFIG_STRATEGY
|
||||
value: {{ config_strategy }}
|
||||
@@ -30,13 +30,10 @@ spec:
|
||||
- containerPort: {{ memcached_port }}
|
||||
name: memcached
|
||||
volumes:
|
||||
{{ lib.common_volumes(indent=8) }}
|
||||
- name: memcached-config
|
||||
configMap:
|
||||
name: memcached
|
||||
- name: host-etc-localtime
|
||||
hostPath:
|
||||
path: /etc/localtime
|
||||
|
||||
metadata:
|
||||
name: memcached
|
||||
namespace: {{ kolla_kubernetes_namespace }}
|
||||
|
||||
Reference in New Issue
Block a user