SHARE
TWEET

jinja2

a guest Feb 14th, 2020 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ---
  2. kind: Deployment
  3. apiVersion: extensions/v1beta1
  4. metadata:
  5.   name: guardian-deployment
  6. spec:
  7.   replicas: 1
  8.   template:
  9.     metadata:
  10.       labels:
  11.         deploy: guardian
  12.     spec:
  13.       containers:
  14.         - name: guardian
  15.           image: docker-registry.default.svc:5000/ci00897551-edevlg-openshifttest1/guardian:{{ guardian_version }}
  16.           volumeMounts:
  17. #            {%- for filename in lookup("fileglob", "../files/config/*", wantlist=true) + lookup("fileglob", "../templates/config/*", wantlist=true) -%}
  18. #            {%- if filename | basename not in [ "fix_pipe.xml", "pulse_data_in.xml" ] -%}
  19. #            - name: {{ filename | basename | lower | replace("_", "-") }}
  20. #              readOnly: true
  21. #              mountPath: "/home/guardian/{{ guardian_version }}/config/{{ filename | basename }}"
  22. #                subPath: {{ filename | basename }}
  23. #            {%- endif -%}
  24. #            {%- endfor -%}
  25. #            {% for filename in lookup("fileglob", "../files/config/rfa_config/*", wantlist=true) + lookup("fileglob", "../templates/config/rfa_config/*", wantlist=true) %}
  26. #            - name: {{ filename | basename | lower | replace("_", "-") }}
  27. #              readOnly: true
  28. #              mountPath: "/home/guardian/{{ guardian_version }}/config/rfa_config/{{ filename | basename }}"
  29. #                subPath: {{ filename | basename }}
  30. #            {% endfor %}
  31.  
  32.             {% filter indent(10) %}
  33.             {% for key,value in nodes.fix_pipe.items() %}
  34.             - name: {{ [ "fix_pipe_", key, ".xml" ] | join("") | lower | replace("_", "-") }}
  35.               {% filter indent(2) %}
  36.               readOnly: true
  37.               mountPath: "/home/guardian/{{ guardian_version }}/config/fix_pipe_{{ key }}.xml"
  38.                 {% filter indent(2) %}
  39.                 subPath: fix_pipe_{{ key }}.xml
  40.                 {% endfilter %}
  41.               {% endfilter %}
  42.             {% endfor %}
  43.  
  44.             {% for filename in nodes.pulse_data_in|dict2items | subelements('value.host_types') %}
  45.             - name: {{ [ filename.0.key, "_in_", filename.1, ".xml" ] | join("") | lower | replace("_", "-") }}
  46.               {% filter indent(2) %}
  47.               readOnly: true
  48.               mountPath: "/home/guardian/{{ guardian_version }}/config/{{ filename.0.key }}_in_{{ filename.1 }}.xml"
  49.                 {% filter indent(2) %}
  50.                 subPath: {{ filename.0.key }}_in_{{ filename.1 }}.xml
  51.                 {% endfilter %}
  52.               {% endfilter %}
  53.             {% endfor %}
  54.             {% endfilter %}
  55.  
  56.             {% for key,value in nodes.fix_pipe.items() %}
  57.             - name: {{ [ "fix_pipe_", key, ".xsd" ] | join("") | lower | replace("_", "-") }}
  58.               readOnly: true
  59.               mountPath: "/home/guardian/{{ guardian_version }}/config/fix_pipe_{{ key }}.xsd"
  60.                 subPath: fix_pipe_{{ key }}.xsd
  61.             {% endfor %}
  62.  
  63.             {% for filename in nodes.pulse_data_in|dict2items | subelements('value.host_types') %}
  64.             - name: {{ [ filename.0.key, "_in_", filename.1, ".xsd" ] | join("") | lower | replace("_", "-") }}
  65.               readOnly: true
  66.               mountPath: "/home/guardian/{{ guardian_version }}/config/{{ filename.0.key }}_in_{{ filename.1 }}.xsd"
  67.                 subPath: {{ filename.0.key }}_in_{{ filename.1 }}.xsd
  68.             {% endfor %}
  69.  
  70.             {% for filename in lookup("fileglob", "../templates/etc/*", wantlist=true) %}
  71.             - name: {{ filename | basename | lower | replace("_", "-") }}
  72.               readOnly: true
  73.               mountPath: "/etc/{{ filename | basename }}"
  74.                 subPath: {{ filename | basename }}
  75.             {% endfor %}
  76.  
  77.       volumes:
  78. #        {% for filename in lookup("fileglob", "../files/config/*", wantlist=true) + lookup("fileglob", "../templates/config/*", wantlist=true) %}
  79. #        {% if  filename | basename not in [ "fix_pipe.xml", "pulse_data_in.xml" ] %}
  80. #        - name: {{ filename | basename | lower | replace("_", "-") }}
  81. #          secret:
  82. #            secretName: {{ filename | basename | lower | replace("_", "-") }}
  83. #        {% endif %}
  84. #        {% endfor %}
  85. #        {% for filename in lookup("fileglob", "../files/config/rfa_config/*", wantlist=true) + lookup("fileglob", "../templates/config/rfa_config/*", wantlist=true) %}
  86. #        - name: {{ filename | basename | lower | replace("_", "-") }}
  87. #          secret:
  88. #            secretName: {{ filename | basename | lower | replace("_", "-") }}
  89. #        {% endfor %}
  90.  
  91.         {% for key,value in nodes.fix_pipe.items() %}
  92.         - name: {{ [ "fix_pipe_", key, ".xml" ] | join("") | lower |  replace("_", "-") }}
  93.           secret:
  94.             secretName: {{ [ "fix_pipe_", key, ".xml" ] | join("") | lower | replace("_", "-") }}
  95.         {% endfor %}
  96.  
  97.         {% for filename in nodes.pulse_data_in|dict2items | subelements('value.host_types') %}
  98.         - name: {{ [ filename.0.key, "_in_", filename.1, ".xml" ] | join("") | lower | replace("_", "-") }}
  99.           secret:
  100.             secretName: {{ [ filename.0.key, "_in_", filename.1, ".xml" ] | join("") | lower | replace("_", "-") }}
  101.         {% endfor %}
  102.  
  103.         {% for key,value in nodes.fix_pipe.items() %}
  104.         - name: {{ [ "fix_pipe_", key, ".xsd" ] | join("") | lower | replace("_", "-") }}
  105.           secret:
  106.             secretName: {{ [ "fix_pipe_", key, ".xsd" ] | join("") | lower | replace("_", "-") }}
  107.         {% endfor %}
  108.  
  109.         {% for filename in nodes.pulse_data_in|dict2items | subelements('value.host_types') %}
  110.         - name: {{ [ filename.0.key, "_in_", filename.1, ".xsd" ] | join("") | lower | replace("_", "-") }}
  111.           secret:
  112.              secretName: {{ [ filename.0.key, "_in_", filename.1, ".xsd" ] | join("") | lower | replace("_", "-") }}
  113.         {% endfor %}
  114.  
  115.         {% for filename in lookup("fileglob", "../templates/etc/*", wantlist=true) %}
  116.         - name: {{ filename | basename | lower | replace("_", "-") }}
  117.           secret:
  118.             secretName: {{ filename | basename | lower | replace("_", "-") }}
  119.         {% endfor %}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top