Adding dependencies, binary autostart
This commit is contained in:
		
							
								
								
									
										16
									
								
								opencloud/charts/loki/templates/tests/_helpers.tpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								opencloud/charts/loki/templates/tests/_helpers.tpl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
{{/*
 | 
			
		||||
Docker image name for loki helm test
 | 
			
		||||
*/}}
 | 
			
		||||
{{- define "loki.helmTestImage" -}}
 | 
			
		||||
{{- $dict := dict "service" .Values.test.image "global" .Values.global.image "defaultVersion" "latest" -}}
 | 
			
		||||
{{- include "loki.baseImage" $dict -}}
 | 
			
		||||
{{- end -}}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{{/*
 | 
			
		||||
test common labels
 | 
			
		||||
*/}}
 | 
			
		||||
{{- define "loki.helmTestLabels" -}}
 | 
			
		||||
{{ include "loki.labels" . }}
 | 
			
		||||
app.kubernetes.io/component: helm-test
 | 
			
		||||
{{- end }}
 | 
			
		||||
							
								
								
									
										36
									
								
								opencloud/charts/loki/templates/tests/test-canary.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								opencloud/charts/loki/templates/tests/test-canary.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,36 @@
 | 
			
		||||
{{- with .Values.test }}
 | 
			
		||||
{{- if $.Values.lokiCanary.enabled }}
 | 
			
		||||
---
 | 
			
		||||
apiVersion: v1
 | 
			
		||||
kind: Pod
 | 
			
		||||
metadata:
 | 
			
		||||
  name: "{{ include "loki.name" $ }}-helm-test"
 | 
			
		||||
  namespace: {{ $.Release.Namespace }}
 | 
			
		||||
  labels:
 | 
			
		||||
    {{- include "loki.helmTestLabels" $ | nindent 4 }}
 | 
			
		||||
    {{- with .labels }}
 | 
			
		||||
    {{- toYaml . | nindent 4 }}
 | 
			
		||||
    {{- end }}
 | 
			
		||||
  annotations:
 | 
			
		||||
    {{- with .annotations }}
 | 
			
		||||
    {{- toYaml . | nindent 4 }}
 | 
			
		||||
    {{- end }}
 | 
			
		||||
    "helm.sh/hook": test
 | 
			
		||||
spec:
 | 
			
		||||
  containers:
 | 
			
		||||
    - name: loki-helm-test
 | 
			
		||||
      image: {{ include "loki.helmTestImage" $ }}
 | 
			
		||||
      env:
 | 
			
		||||
        - name: CANARY_SERVICE_ADDRESS
 | 
			
		||||
          value: "{{ .canaryServiceAddress }}"
 | 
			
		||||
        - name: CANARY_PROMETHEUS_ADDRESS
 | 
			
		||||
          value: "{{ .prometheusAddress }}"
 | 
			
		||||
        {{- with .timeout }}
 | 
			
		||||
        - name: CANARY_TEST_TIMEOUT
 | 
			
		||||
          value: "{{ . }}"
 | 
			
		||||
        {{- end }}
 | 
			
		||||
      args:
 | 
			
		||||
        - -test.v
 | 
			
		||||
  restartPolicy: Never
 | 
			
		||||
{{- end }}
 | 
			
		||||
{{- end }}
 | 
			
		||||
		Reference in New Issue
	
	Block a user