diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-02-06 07:41:01 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-06 07:41:01 -0800 |
commit | a06bc5b19875e7ac665c8c7c6b8400d1f4de0f79 (patch) | |
tree | 9b26625bed554866dcc6ff1e5f5a72b872c6ff4a /roles/openshift_daemonset_config/templates | |
parent | d512d781be3530997522fb38ba29ee7f33eae5c8 (diff) | |
parent | 1a4b2205ae100ca7d7947e18e94c93d690ad9db7 (diff) | |
download | openshift-a06bc5b19875e7ac665c8c7c6b8400d1f4de0f79.tar.gz openshift-a06bc5b19875e7ac665c8c7c6b8400d1f4de0f79.tar.bz2 openshift-a06bc5b19875e7ac665c8c7c6b8400d1f4de0f79.tar.xz openshift-a06bc5b19875e7ac665c8c7c6b8400d1f4de0f79.zip |
Merge pull request #7016 from kwoodson/daemonset_monitoring
Automatic merge from submit-queue.
daemonset config modifications to allow monitoring.
Modifications that allow custom secrets, configmaps, and shared setup between containers for config and monitoring.
Diffstat (limited to 'roles/openshift_daemonset_config/templates')
-rw-r--r-- | roles/openshift_daemonset_config/templates/daemonset.yml.j2 | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/roles/openshift_daemonset_config/templates/daemonset.yml.j2 b/roles/openshift_daemonset_config/templates/daemonset.yml.j2 index 9792f6d16..02cd5bcfd 100644 --- a/roles/openshift_daemonset_config/templates/daemonset.yml.j2 +++ b/roles/openshift_daemonset_config/templates/daemonset.yml.j2 @@ -33,7 +33,7 @@ spec: hostIPC: true containers: - name: config - image: centos:7 + image: "{{ openshift_daemonset_config_image }}" env: - name: RESYNC_INTERVAL value: "{{ openshift_daemonset_config_interval }}" @@ -50,8 +50,8 @@ spec: sh /opt/config/{{ openshift_daemonset_config_script }} # sleep for ${RESYNC_INTERVAL} minutes, then loop. if we fail Kubelet will restart us again - echo "Success, sleeping for ${RESYNC_INTERVAL}s" - exec sleep ${RESYNC_INTERVAL} + echo "Success, sleeping for ${RESYNC_INTERVAL}s. Date: $(date)" + sleep ${RESYNC_INTERVAL} # Return to perform the config done @@ -68,6 +68,8 @@ spec: # Our node configuration - mountPath: /opt/config name: config + - mountPath: /opt/tmp_shared_config + name: tmp-shared-dir {% if openshift_daemonset_config_secrets != {} %} # Our delivered secrets - mountPath: /opt/secrets @@ -79,12 +81,14 @@ spec: memory: {{ openshift_daemonset_config_resources.memory }} {% if openshift_daemonset_config_monitoring %} - name: monitoring - image: openshifttools/oso-centos7-host-monitoring:latest + image: "{{ openshift_daemonset_config_monitoring_image }}" + env: + - name: OO_PAUSE_ON_START + value: "{{ openshift_daemonset_config_monitoring_pos }}" securityContext: # Must be root to read content runAsUser: 0 privileged: true - volumeMounts: - mountPath: /host name: host @@ -118,17 +122,23 @@ spec: - mountPath: /host/var/cache/yum subPath: var/cache/yum name: host - - mountPath: /container_setup/monitoring-config.yml - subPath: monitoring-config.yaml - name: config + readOnly: true + - mountPath: /container_setup + name: tmp-shared-dir - mountPath: /opt/config name: config +{% if openshift_daemonset_config_secrets != {} %} + - mountPath: /opt/secrets + name: secrets +{% endif %} resources: requests: cpu: 10m memory: 10Mi {% endif %} volumes: + - name: tmp-shared-dir + emptyDir: {} - name: config configMap: name: {{ openshift_daemonset_config_configmap_name }} |