Browse Source

Bug 1471322: logging roles based image versions

Allowing to specify an image version for each logging component

https://bugzilla.redhat.com/show_bug.cgi?id=1471322
Jan Wozniak 7 years ago
parent
commit
00e7908e98

+ 12 - 0
roles/openshift_logging/README.md

@@ -22,7 +22,19 @@ When both `openshift_logging_install_logging` and `openshift_logging_upgrade_log
 ###Optional vars:
 
 - `openshift_logging_image_prefix`: The prefix for the logging images to use. Defaults to 'docker.io/openshift/origin-'.
+- `openshift_logging_curator_image_prefix`: Setting the image prefix for Curator image. Defaults to `openshift_logging_image_prefix`.
+- `openshift_logging_elasticsearch_image_prefix`: Setting the image prefix for Elasticsearch image. Defaults to `openshift_logging_image_prefix`.
+- `openshift_logging_fluentd_image_prefix`: Setting the image prefix for Fluentd image. Defaults to `openshift_logging_image_prefix`.
+- `openshift_logging_kibana_image_prefix`: Setting the image prefix for Kibana image. Defaults to `openshift_logging_image_prefix`.
+- `openshift_logging_kibana_proxy_image_prefix`: Setting the image prefix for Kibana proxy image. Defaults to `openshift_logging_image_prefix`.
+- `openshift_logging_mux_image_prefix`: Setting the image prefix for Mux image. Defaults to `openshift_logging_image_prefix`.
 - `openshift_logging_image_version`: The image version for the logging images to use. Defaults to 'latest'.
+- `openshift_logging_curator_image_version`: Setting the image version for Curator image. Defaults to `openshift_logging_image_version`.
+- `openshift_logging_elasticsearch_image_version`: Setting the image version for Elasticsearch image. Defaults to `openshift_logging_image_version`.
+- `openshift_logging_fluentd_image_version`: Setting the image version for Fluentd image. Defaults to `openshift_logging_image_version`.
+- `openshift_logging_kibana_image_version`: Setting the image version for Kibana image. Defaults to `openshift_logging_image_version`.
+- `openshift_logging_kibana_proxy_image_version`: Setting the image version for Kibana proxy image. Defaults to `openshift_logging_image_version`.
+- `openshift_logging_mux_image_version`: Setting the image version for Mux image. Defaults to `openshift_logging_image_version`.
 - `openshift_logging_use_ops`: If 'True', set up a second ES and Kibana cluster for infrastructure logs. Defaults to 'False'.
 - `openshift_logging_master_url`: The URL for the Kubernetes master, this does not need to be public facing but should be accessible from within the cluster. Defaults to 'https://kubernetes.default.svc.{{openshift.common.dns_domain}}'.
 - `openshift_logging_master_public_url`: The public facing URL for the Kubernetes master, this is used for Authentication redirection. Defaults to 'https://{{openshift.common.public_hostname}}:{{openshift.master.api_port}}'.

+ 0 - 12
roles/openshift_logging/tasks/install_logging.yaml

@@ -181,8 +181,6 @@
     openshift_logging_kibana_namespace: "{{ openshift_logging_namespace }}"
     openshift_logging_kibana_master_url: "{{ openshift_logging_master_url }}"
     openshift_logging_kibana_master_public_url: "{{ openshift_logging_master_public_url }}"
-    openshift_logging_kibana_image_prefix: "{{ openshift_logging_image_prefix }}"
-    openshift_logging_kibana_image_version: "{{ openshift_logging_image_version }}"
     openshift_logging_kibana_replicas: "{{ openshift_logging_kibana_replica_count }}"
     openshift_logging_kibana_es_host: "{{ openshift_logging_es_host }}"
     openshift_logging_kibana_es_port: "{{ openshift_logging_es_port }}"
@@ -197,8 +195,6 @@
     openshift_logging_kibana_namespace: "{{ openshift_logging_namespace }}"
     openshift_logging_kibana_master_url: "{{ openshift_logging_master_url }}"
     openshift_logging_kibana_master_public_url: "{{ openshift_logging_master_public_url }}"
-    openshift_logging_kibana_image_prefix: "{{ openshift_logging_image_prefix }}"
-    openshift_logging_kibana_image_version: "{{ openshift_logging_image_version }}"
     openshift_logging_kibana_image_pull_secret: "{{ openshift_logging_image_pull_secret }}"
     openshift_logging_kibana_es_host: "{{ openshift_logging_es_ops_host }}"
     openshift_logging_kibana_es_port: "{{ openshift_logging_es_ops_port }}"
@@ -226,8 +222,6 @@
     openshift_logging_curator_es_host: "{{ openshift_logging_es_host }}"
     openshift_logging_curator_es_port: "{{ openshift_logging_es_port }}"
     openshift_logging_curator_master_url: "{{ openshift_logging_master_url }}"
-    openshift_logging_curator_image_prefix: "{{ openshift_logging_image_prefix }}"
-    openshift_logging_curator_image_version: "{{ openshift_logging_image_version }}"
     openshift_logging_curator_image_pull_secret: "{{ openshift_logging_image_pull_secret }}"
 
 - include_role:
@@ -239,8 +233,6 @@
     openshift_logging_curator_es_port: "{{ openshift_logging_es_ops_port }}"
     openshift_logging_curator_namespace: "{{ openshift_logging_namespace }}"
     openshift_logging_curator_master_url: "{{ openshift_logging_master_url }}"
-    openshift_logging_curator_image_prefix: "{{ openshift_logging_image_prefix }}"
-    openshift_logging_curator_image_version: "{{ openshift_logging_image_version }}"
     openshift_logging_curator_image_pull_secret: "{{ openshift_logging_image_pull_secret }}"
     openshift_logging_curator_cpu_limit: "{{ openshift_logging_curator_ops_cpu_limit }}"
     openshift_logging_curator_memory_limit: "{{ openshift_logging_curator_ops_memory_limit }}"
@@ -256,8 +248,6 @@
     openshift_logging_mux_ops_host: "{{ ( openshift_logging_use_ops | bool ) | ternary('logging-es-ops', 'logging-es') }}"
     openshift_logging_mux_namespace: "{{ openshift_logging_namespace }}"
     openshift_logging_mux_master_url: "{{ openshift_logging_master_url }}"
-    openshift_logging_mux_image_prefix: "{{ openshift_logging_image_prefix }}"
-    openshift_logging_mux_image_version: "{{ openshift_logging_image_version }}"
     openshift_logging_mux_image_pull_secret: "{{ openshift_logging_image_pull_secret }}"
   when:
   - openshift_logging_use_mux | bool
@@ -269,8 +259,6 @@
   vars:
     generated_certs_dir: "{{openshift.common.config_base}}/logging"
     openshift_logging_fluentd_ops_host: "{{ ( openshift_logging_use_ops | bool ) | ternary('logging-es-ops', 'logging-es') }}"
-    openshift_logging_fluentd_image_prefix: "{{ openshift_logging_image_prefix }}"
-    openshift_logging_fluentd_image_version: "{{ openshift_logging_image_version }}"
     openshift_logging_fluentd_image_pull_secret: "{{ openshift_logging_image_pull_secret }}"
     openshift_logging_fluentd_master_url: "{{ openshift_logging_master_url }}"
     openshift_logging_fluentd_namespace: "{{ openshift_logging_namespace }}"

+ 2 - 2
roles/openshift_logging_curator/defaults/main.yml

@@ -1,7 +1,7 @@
 ---
 ### General logging settings
-openshift_logging_curator_image_prefix: "{{ openshift_hosted_logging_deployer_prefix | default('docker.io/openshift/origin-') }}"
-openshift_logging_curator_image_version: "{{ openshift_hosted_logging_deployer_version | default('latest') }}"
+openshift_logging_curator_image_prefix: "{{ openshift_logging_image_prefix | default(__openshift_logging_image_prefix) }}"
+openshift_logging_curator_image_version: "{{ openshift_logging_image_version | default('latest') }}"
 openshift_logging_curator_image_pull_secret: "{{ openshift_hosted_logging_image_pull_secret | default('') }}"
 openshift_logging_curator_master_url: "https://kubernetes.default.svc.cluster.local"
 

+ 1 - 1
roles/openshift_logging_curator/tasks/main.yaml

@@ -86,7 +86,7 @@
     component: "{{ curator_component }}"
     logging_component: curator
     deploy_name: "{{ curator_name }}"
-    image: "{{openshift_logging_image_prefix}}logging-curator:{{openshift_logging_image_version}}"
+    image: "{{openshift_logging_curator_image_prefix}}logging-curator:{{openshift_logging_curator_image_version}}"
     es_host: "{{ openshift_logging_curator_es_host }}"
     es_port: "{{ openshift_logging_curator_es_port }}"
     curator_cpu_limit: "{{ openshift_logging_curator_cpu_limit }}"

+ 2 - 2
roles/openshift_logging_elasticsearch/defaults/main.yml

@@ -1,7 +1,7 @@
 ---
 ### Common settings
-openshift_logging_elasticsearch_image_prefix: "{{ openshift_hosted_logging_deployer_prefix | default('docker.io/openshift/origin-') }}"
-openshift_logging_elasticsearch_image_version: "{{ openshift_hosted_logging_deployer_version | default('latest') }}"
+openshift_logging_elasticsearch_image_prefix: "{{ openshift_logging_image_prefix | default(__openshift_logging_image_prefix) }}"
+openshift_logging_elasticsearch_image_version: "{{ openshift_logging_image_version | default('latest') }}"
 openshift_logging_elasticsearch_image_pull_secret: "{{ openshift_hosted_logging_image_pull_secret | default('') }}"
 openshift_logging_elasticsearch_namespace: logging
 

+ 1 - 1
roles/openshift_logging_elasticsearch/tasks/main.yaml

@@ -263,7 +263,7 @@
     component: "{{ es_component }}"
     logging_component: elasticsearch
     deploy_name: "{{ es_deploy_name }}"
-    image: "{{ openshift_logging_image_prefix }}logging-elasticsearch:{{ openshift_logging_image_version }}"
+    image: "{{ openshift_logging_elasticsearch_image_prefix }}logging-elasticsearch:{{ openshift_logging_elasticsearch_image_version }}"
     es_cpu_limit: "{{ openshift_logging_elasticsearch_cpu_limit }}"
     es_memory_limit: "{{ openshift_logging_elasticsearch_memory_limit }}"
     es_node_selector: "{{ openshift_logging_elasticsearch_nodeselector | default({}) }}"

+ 2 - 2
roles/openshift_logging_fluentd/defaults/main.yml

@@ -1,7 +1,7 @@
 ---
 ### General logging settings
-openshift_logging_fluentd_image_prefix: "{{ openshift_hosted_logging_deployer_prefix | default('docker.io/openshift/origin-') }}"
-openshift_logging_fluentd_image_version: "{{ openshift_hosted_logging_deployer_version | default('latest') }}"
+openshift_logging_fluentd_image_prefix: "{{ openshift_logging_image_prefix | default(__openshift_logging_image_prefix) }}"
+openshift_logging_fluentd_image_version: "{{ openshift_logging_image_version | default('latest') }}"
 openshift_logging_fluentd_image_pull_secret: "{{ openshift_hosted_logging_image_pull_secret | default('') }}"
 openshift_logging_fluentd_master_url: "https://kubernetes.default.svc.{{ openshift.common.dns_domain }}"
 openshift_logging_fluentd_namespace: logging

+ 1 - 1
roles/openshift_logging_fluentd/templates/fluentd.j2

@@ -28,7 +28,7 @@ spec:
         {{ fluentd_nodeselector_key }}: "{{ fluentd_nodeselector_value }}"
       containers:
       - name: "{{ daemonset_container_name }}"
-        image: "{{ openshift_logging_image_prefix }}{{ daemonset_name }}:{{ openshift_logging_image_version }}"
+        image: "{{ openshift_logging_fluentd_image_prefix }}{{ daemonset_name }}:{{ openshift_logging_fluentd_image_version }}"
         imagePullPolicy: Always
         securityContext:
           privileged: true

+ 4 - 2
roles/openshift_logging_kibana/defaults/main.yml

@@ -2,8 +2,8 @@
 ### Common settings
 openshift_logging_kibana_master_url: "https://kubernetes.default.svc.cluster.local"
 openshift_logging_kibana_master_public_url: "https://kubernetes.default.svc.cluster.local"
-openshift_logging_kibana_image_prefix: "{{ openshift_hosted_logging_deployer_prefix | default('docker.io/openshift/origin-') }}"
-openshift_logging_kibana_image_version: "{{ openshift_hosted_logging_deployer_version | default('latest') }}"
+openshift_logging_kibana_image_prefix: "{{ openshift_logging_image_prefix | default(__openshift_logging_image_prefix) }}"
+openshift_logging_kibana_image_version: "{{ openshift_logging_image_version | default('latest') }}"
 openshift_logging_kibana_image_pull_secret: "{{ openshift_hosted_logging_image_pull_secret | default('') }}"
 openshift_logging_kibana_namespace: logging
 
@@ -24,6 +24,8 @@ openshift_logging_kibana_edge_term_policy: Redirect
 openshift_logging_kibana_ops_deployment: false
 
 # Proxy settings
+openshift_logging_kibana_proxy_image_prefix: "{{ openshift_logging_image_prefix | default(__openshift_logging_image_prefix) }}"
+openshift_logging_kibana_proxy_image_version: "{{ openshift_logging_image_version | default('latest') }}"
 openshift_logging_kibana_proxy_debug: false
 openshift_logging_kibana_proxy_cpu_limit: null
 openshift_logging_kibana_proxy_memory_limit: 96Mi

+ 2 - 2
roles/openshift_logging_kibana/tasks/main.yaml

@@ -225,8 +225,8 @@
     component: "{{ kibana_component }}"
     logging_component: kibana
     deploy_name: "{{ kibana_name }}"
-    image: "{{ openshift_logging_image_prefix }}logging-kibana:{{ openshift_logging_image_version }}"
-    proxy_image: "{{ openshift_logging_image_prefix }}logging-auth-proxy:{{ openshift_logging_image_version }}"
+    image: "{{ openshift_logging_kibana_image_prefix }}logging-kibana:{{ openshift_logging_kibana_image_version }}"
+    proxy_image: "{{ openshift_logging_kibana_proxy_image_prefix }}logging-auth-proxy:{{ openshift_logging_kibana_proxy_image_version }}"
     es_host: "{{ openshift_logging_kibana_es_host }}"
     es_port: "{{ openshift_logging_kibana_es_port }}"
     kibana_cpu_limit: "{{ openshift_logging_kibana_cpu_limit }}"

+ 2 - 2
roles/openshift_logging_mux/defaults/main.yml

@@ -1,7 +1,7 @@
 ---
 ### General logging settings
-openshift_logging_mux_image_prefix: "{{ openshift_hosted_logging_deployer_prefix | default('docker.io/openshift/origin-') }}"
-openshift_logging_mux_image_version: "{{ openshift_hosted_logging_deployer_version | default('latest') }}"
+openshift_logging_mux_image_prefix: "{{ openshift_logging_image_prefix | default(__openshift_logging_image_prefix) }}"
+openshift_logging_mux_image_version: "{{ openshift_logging_image_version | default('latest') }}"
 openshift_logging_mux_image_pull_secret: "{{ openshift_hosted_logging_image_pull_secret | default('') }}"
 openshift_logging_mux_master_url: "https://kubernetes.default.svc.{{ openshift.common.dns_domain }}"
 openshift_logging_mux_master_public_url: "{{ openshift_hosted_logging_master_public_url | default('https://' + openshift.common.public_hostname + ':' ~ (openshift_master_api_port | default('8443', true))) }}"

+ 1 - 1
roles/openshift_logging_mux/tasks/main.yaml

@@ -165,7 +165,7 @@
     component: mux
     logging_component: mux
     deploy_name: "logging-{{ component }}"
-    image: "{{ openshift_logging_image_prefix }}logging-fluentd:{{ openshift_logging_image_version }}"
+    image: "{{ openshift_logging_mux_image_prefix }}logging-fluentd:{{ openshift_logging_mux_image_version }}"
     es_host: "{{ openshift_logging_mux_app_host }}"
     es_port: "{{ openshift_logging_mux_app_port }}"
     ops_host: "{{ openshift_logging_mux_ops_host }}"