Fluent-logging: Update tests and template job
This updates the helm tests and the elasticsearch template job. This changes the tests to conditionally check whether the template job is enabled and the templates key is not empty, and uses the result to determine whether to test for the existence of those templates (to account for situations where the job is disabled). This updates the job to also check whether there are templates defined in additional to checking whether the job itself is enabled. Change-Id: I14cedeb8d8a4444a73ea974426c3b0f136d1b698
This commit is contained in:
parent
eba82effdb
commit
5271d246fe
@ -46,6 +46,7 @@ function check_kubernetes_tag () {
|
||||
fi
|
||||
}
|
||||
|
||||
{{ if and (.Values.manifests.job_elasticsearch_template) (not (empty .Values.conf.templates)) }}
|
||||
# Tests whether fluent-logging has successfully generated the elasticsearch index mapping
|
||||
# templates defined by values.yaml
|
||||
function check_templates () {
|
||||
@ -61,9 +62,12 @@ function check_templates () {
|
||||
fi
|
||||
{{ end }}
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
# Sleep for at least the buffer flush time to allow for indices to be populated
|
||||
sleep 30
|
||||
{{ if and (.Values.manifests.job_elasticsearch_template) (not (empty .Values.conf.templates)) }}
|
||||
check_templates
|
||||
{{ end }}
|
||||
check_logstash_index
|
||||
check_kubernetes_tag
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- if .Values.manifests.job_elasticsearch_template }}
|
||||
{{- if and (.Values.manifests.job_elasticsearch_template) (not (empty .Values.conf.templates)) }}
|
||||
{{- $envAll := . }}
|
||||
{{- $esUserSecret := .Values.secrets.elasticsearch.user }}
|
||||
{{- $mounts_elasticsearch_template := .Values.pod.mounts.elasticsearch_template.elasticsearch_template }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user