You've already forked prometheus-fail2ban-exporter-charts
							
							
		
			
				
	
	
		
			141 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			141 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| chart:
 | |
|   appVersion: 0.1.0
 | |
|   version: 0.1.0
 | |
| suite: Ingress template (basic)
 | |
| release:
 | |
|   name: prometheus-fail2ban-exporter-unittest
 | |
|   namespace: testing
 | |
| templates:
 | |
| - templates/ingress.yaml
 | |
| tests:
 | |
| - it: Skip ingress by default.
 | |
|   asserts:
 | |
|   - hasDocuments:
 | |
|       count: 0
 | |
| 
 | |
| - it: Skip ingress, when service is disabled.
 | |
|   set:
 | |
|     services.http.enabled: false
 | |
|     ingress.enabled: true
 | |
|   asserts:
 | |
|   - hasDocuments:
 | |
|       count: 0
 | |
| 
 | |
| - it: Render ingress with default values.
 | |
|   set:
 | |
|     ingress.enabled: true
 | |
|     ingress.hosts:
 | |
|     - host: fail2ban-exporter.example.local
 | |
|       paths:
 | |
|       - path: /
 | |
|         pathType: Prefix
 | |
|     ingress.tls:
 | |
|     - secretName: fail2ban-exporter-http-tls
 | |
|       hosts:
 | |
|       - fail2ban-exporter.example.local
 | |
| 
 | |
|   asserts:
 | |
|   - hasDocuments:
 | |
|       count: 1
 | |
|   - containsDocument:
 | |
|       apiVersion: networking.k8s.io/v1
 | |
|       kind: Ingress
 | |
|       name: prometheus-fail2ban-exporter-unittest
 | |
|       namespace: testing
 | |
|   - notExists:
 | |
|       path: metadata.annotations
 | |
|   - equal:
 | |
|       path: metadata.labels
 | |
|       value:
 | |
|         app.kubernetes.io/instance: prometheus-fail2ban-exporter-unittest
 | |
|         app.kubernetes.io/managed-by: Helm
 | |
|         app.kubernetes.io/name: prometheus-fail2ban-exporter
 | |
|         app.kubernetes.io/version: 0.1.0
 | |
|         helm.sh/chart: prometheus-fail2ban-exporter-0.1.0
 | |
|   - equal:
 | |
|       path: spec.ingressClassName
 | |
|       value: nginx
 | |
|   - contains:
 | |
|       path: spec.rules
 | |
|       content:
 | |
|         host: fail2ban-exporter.example.local
 | |
|         http:
 | |
|           paths:
 | |
|           - path: /
 | |
|             pathType: Prefix
 | |
|             backend:
 | |
|               service:
 | |
|                 name: prometheus-fail2ban-exporter-unittest
 | |
|                 port:
 | |
|                   number: 9191
 | |
|   - contains:
 | |
|       path: spec.tls
 | |
|       content:
 | |
|         hosts:
 | |
|         - fail2ban-exporter.example.local
 | |
|         secretName: fail2ban-exporter-http-tls
 | |
| 
 | |
| - it: Render ingress with custom values.
 | |
|   set:
 | |
|     ingress.enabled: true
 | |
|     ingress.annotations:
 | |
|       foo: bar
 | |
|     ingress.className: nginx
 | |
|     ingress.labels:
 | |
|       bar: foo
 | |
|     ingress.hosts:
 | |
|     - host: fail2ban-exporter.example.local
 | |
|       paths:
 | |
|       - path: /
 | |
|         pathType: Prefix
 | |
|     ingress.tls:
 | |
|     - secretName: fail2ban-exporter-http-tls
 | |
|       hosts:
 | |
|       - fail2ban-exporter.example.local
 | |
| 
 | |
|     services.http.port: 8080
 | |
| 
 | |
|   asserts:
 | |
|   - hasDocuments:
 | |
|       count: 1
 | |
|   - containsDocument:
 | |
|       apiVersion: networking.k8s.io/v1
 | |
|       kind: Ingress
 | |
|       name: prometheus-fail2ban-exporter-unittest
 | |
|       namespace: testing
 | |
|   - equal:
 | |
|       path: metadata.annotations
 | |
|       value:
 | |
|         foo: bar
 | |
|   - equal:
 | |
|       path: metadata.labels
 | |
|       value:
 | |
|         app.kubernetes.io/instance: prometheus-fail2ban-exporter-unittest
 | |
|         app.kubernetes.io/managed-by: Helm
 | |
|         app.kubernetes.io/name: prometheus-fail2ban-exporter
 | |
|         app.kubernetes.io/version: 0.1.0
 | |
|         helm.sh/chart: prometheus-fail2ban-exporter-0.1.0
 | |
|         bar: foo
 | |
|   - equal:
 | |
|       path: spec.ingressClassName
 | |
|       value: nginx
 | |
|   - contains:
 | |
|       path: spec.rules
 | |
|       content:
 | |
|         host: fail2ban-exporter.example.local
 | |
|         http:
 | |
|           paths:
 | |
|           - path: /
 | |
|             pathType: Prefix
 | |
|             backend:
 | |
|               service:
 | |
|                 name: prometheus-fail2ban-exporter-unittest
 | |
|                 port:
 | |
|                   number: 8080
 | |
|   - contains:
 | |
|       path: spec.tls
 | |
|       content:
 | |
|         hosts:
 | |
|         - fail2ban-exporter.example.local
 | |
|         secretName: fail2ban-exporter-http-tls
 |