diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-01-02 16:08:15 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-02 16:08:15 -0800 |
commit | b1be9cd5d7573dc9d18ca27915bb383f8591117b (patch) | |
tree | fa76d72a4ecf648056dfedc6c68cb5f315341409 /roles/openshift_logging_mux | |
parent | 8119a5c87a1560c2f607c06f30383133cc7137e5 (diff) | |
parent | 8cb27ae800df71ee816852df56cd2c861a0f0a0a (diff) | |
download | openshift-b1be9cd5d7573dc9d18ca27915bb383f8591117b.tar.gz openshift-b1be9cd5d7573dc9d18ca27915bb383f8591117b.tar.bz2 openshift-b1be9cd5d7573dc9d18ca27915bb383f8591117b.tar.xz openshift-b1be9cd5d7573dc9d18ca27915bb383f8591117b.zip |
Merge pull request #5894 from ewolinetz/logging_defaults_from_existing
Automatic merge from submit-queue.
Update logging to use existing cluster deployment for defaults
This will allow us to use logging facts to set defaults of specific configurations such as ES index replicas and shard count.
The update to logging facts yields us output like:
```json
"elasticsearch": {
"clusterrolebindings": {},
"configmaps": {
"logging-elasticsearch": {
"elasticsearch.yml": {
"cloud": {
"kubernetes": {
"namespace": "${NAMESPACE}",
"pod_label": "${POD_LABEL}",
"pod_port": 9300
}
},
"cluster": {
"name": "${CLUSTER_NAME}"
},
"discovery": {
"type": "kubernetes",
"zen.minimum_master_nodes": "${NODE_QUORUM}",
"zen.ping.multicast.enabled": false
},
"gateway": {
"expected_nodes": "${RECOVER_EXPECTED_NODES}",
"recover_after_nodes": "${NODE_QUORUM}",
"recover_after_time": "${RECOVER_AFTER_TIME}"
},
"index": {
"number_of_replicas": 0,
"number_of_shards": 1,
"translog": {
"flush_threshold_period": "5m",
"flush_threshold_size": "256mb"
},
"unassigned.node_left.delayed_timeout": "2m"
},
"io.fabric8.elasticsearch.authentication.users": [
"system.logging.kibana",
"system.logging.fluentd",
"system.logging.curator",
"system.admin"
],
```
TODO:
- [x] Update logging facts to pull out settings from config maps
- [x] Move `openshift_sanitize_inventory/library/conditional_set_fact.py` up to repo level
- [x] Generate diffs against currently deployed configs and correctly patch in custom changes from customers
- [x] Use `conditional_set_fact` to easily set defaults for logging based on logging facts, or falling back to role defaults when not specified in the inventory
- [x] Update all components to follow patching configmaps
Diffstat (limited to 'roles/openshift_logging_mux')
-rw-r--r-- | roles/openshift_logging_mux/tasks/main.yaml | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/roles/openshift_logging_mux/tasks/main.yaml b/roles/openshift_logging_mux/tasks/main.yaml index 59a6301d7..a281c6a53 100644 --- a/roles/openshift_logging_mux/tasks/main.yaml +++ b/roles/openshift_logging_mux/tasks/main.yaml @@ -88,26 +88,24 @@ - copy: src: fluent.conf dest: "{{mktemp.stdout}}/fluent-mux.conf" - when: fluentd_mux_config_contents is undefined changed_when: no - copy: src: secure-forward.conf dest: "{{mktemp.stdout}}/secure-forward-mux.conf" - when: fluentd_mux_securefoward_contents is undefined changed_when: no -- copy: - content: "{{fluentd_mux_config_contents}}" - dest: "{{mktemp.stdout}}/fluent-mux.conf" - when: fluentd_mux_config_contents is defined - changed_when: no - -- copy: - content: "{{fluentd_mux_secureforward_contents}}" - dest: "{{mktemp.stdout}}/secure-forward-mux.conf" - when: fluentd_mux_secureforward_contents is defined - changed_when: no +- include_role: + name: openshift_logging + tasks_from: patch_configmap_files.yaml + vars: + configmap_name: "logging-mux" + configmap_namespace: "{{ openshift_logging_mux_namespace }}" + configmap_file_names: + - current_file: "fluent.conf" + new_file: "{{ tempdir }}/fluent-mux.conf" + - current_file: "secure-forward.conf" + new_file: "{{ tempdir }}/secure-forward-mux.conf" - name: Set Mux configmap oc_configmap: |