Initial treasuremap/template for site_type ovsdpdk
[yaml_builds.git] / site_type / ovsdpdk / airship-treasuremap / global / v4.0 / software / charts / osh-infra / osh-infra-logging / elasticsearch.yaml
1 ---
2 schema: armada/Chart/v1
3 metadata:
4   schema: metadata/Document/v1
5   name: elasticsearch-global
6   labels:
7     hosttype: elasticsearch-global
8   layeringDefinition:
9     abstract: true
10     layer: global
11   storagePolicy: cleartext
12   substitutions:
13     # Chart source
14     - src:
15         schema: pegleg/SoftwareVersions/v1
16         name: software-versions
17         path: .charts.osh_infra.elasticsearch
18       dest:
19         path: .source
20
21     # Images
22     - src:
23         schema: pegleg/SoftwareVersions/v1
24         name: software-versions
25         path: .images.osh_infra.elasticsearch
26       dest:
27         path: .values.images.tags
28
29     # Endpoints
30     - src:
31         schema: pegleg/EndpointCatalogue/v1
32         name: osh_infra_endpoints
33         path: .osh_infra.elasticsearch
34       dest:
35         path: .values.endpoints.elasticsearch
36     - src:
37         schema: pegleg/EndpointCatalogue/v1
38         name: osh_infra_endpoints
39         path: .osh_infra.prometheus_elasticsearch_exporter
40       dest:
41         path: .values.endpoints.prometheus_elasticsearch_exporter
42
43     - src:
44         schema: pegleg/EndpointCatalogue/v1
45         name: osh_infra_endpoints
46         path: .osh_infra.ldap
47       dest:
48         path: .values.endpoints.ldap
49
50     # Accounts
51     - src:
52         schema: pegleg/AccountCatalogue/v1
53         name: osh_infra_service_accounts
54         path: .osh_infra.elasticsearch.admin
55       dest:
56         path: .values.endpoints.elasticsearch.auth.admin
57
58     # Secrets
59     - dest:
60         path: .values.endpoints.elasticsearch.auth.admin.password
61       src:
62         schema: deckhand/Passphrase/v1
63         name: osh_infra_elasticsearch_admin_password
64         path: .
65
66     # LDAP Details
67     - src:
68         schema: pegleg/AccountCatalogue/v1
69         name: osh_infra_service_accounts
70         path: .osh_infra.ldap.admin
71       dest:
72         path: .values.endpoints.ldap.auth.admin
73     - dest:
74         path: .values.endpoints.ldap.auth.admin.password
75       src:
76         schema: deckhand/Passphrase/v1
77         name: osh_keystone_ldap_password
78         path: .
79 data:
80   chart_name: elasticsearch
81   release: elasticsearch
82   namespace: osh-infra
83   wait:
84     timeout: 900
85     labels:
86       release_group: airship-elasticsearch
87   install:
88     no_hooks: false
89   upgrade:
90     no_hooks: false
91     pre:
92       delete:
93         - type: job
94           labels:
95             release_group: airship-elasticsearch
96       create: []
97     post:
98       create: []
99   values:
100     labels:
101       elasticsearch:
102         node_selector_key: openstack-control-plane
103         node_selector_value: enabled
104       job:
105         node_selector_key: openstack-control-plane
106         node_selector_value: enabled
107     monitoring:
108       prometheus:
109         enabled: true
110     conf:
111       apache:
112         host: |
113           <VirtualHost *:80>
114             <Location />
115                 ProxyPass http://localhost:{{ tuple "elasticsearch" "internal" "client" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}/
116                 ProxyPassReverse http://localhost:{{ tuple "elasticsearch" "internal" "client" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}/
117             </Location>
118             <Proxy *>
119                 AuthName "Elasticsearch"
120                 AuthType Basic
121                 AuthBasicProvider file ldap
122                 AuthUserFile /usr/local/apache2/conf/.htpasswd
123                 AuthLDAPBindDN {{ .Values.endpoints.ldap.auth.admin.bind }}
124                 AuthLDAPBindPassword {{ .Values.endpoints.ldap.auth.admin.password }}
125                 AuthLDAPURL {{ tuple "ldap" "public" "ldap" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }}
126                 Require valid-user
127             </Proxy>
128           </VirtualHost>
129       elasticsearch:
130         env:
131           java_opts: "-Xms5g -Xmx5g"
132       curator:
133         #run every 6th hour
134         schedule:  "0 */6 * * *"
135         action_file:
136           # Remember, leave a key empty if there is no value.  None will be a string,
137           # not a Python "NoneType"
138           #
139           # Also remember that all examples have 'disable_action' set to True.  If you
140           # want to use this action as a template, be sure to set this to False after
141           # copying it.
142           actions:
143             1:
144               action: delete_indices
145               description: >-
146                 "Delete indices older than 7 days"
147               options:
148                 timeout_override:
149                 continue_if_exception: False
150                 ignore_empty_list: True
151                 disable_action: False
152               filters:
153               - filtertype: pattern
154                 kind: prefix
155                 value: logstash-
156               - filtertype: age
157                 source: name
158                 direction: older
159                 timestring: '%Y.%m.%d'
160                 unit: days
161                 unit_count: 7
162             2:
163               action: delete_indices
164               description: >-
165                 "Delete indices by age if available disk space is
166                  less than 80% total disk"
167               options:
168                 timeout_override: 600
169                 continue_if_exception: False
170                 ignore_empty_list: True
171                 disable_action: False
172               filters:
173               - filtertype: pattern
174                 kind: prefix
175                 value: logstash-
176               - filtertype: space
177                 source: creation_date
178                 use_age: True
179                 disk_space: 1200
180     storage:
181       elasticsearch:
182         requests:
183           storage: 500Gi
184   dependencies:
185     - osh-infra-helm-toolkit
186 ...