Skip to content

Commit

Permalink
Enhanced ingress configuration on anchore-engine chart (helm#7798)
Browse files Browse the repository at this point in the history
Signed-off-by: Maxime VISONNEAU <[email protected]>
  • Loading branch information
mvisonneau authored and k8s-ci-robot committed Sep 25, 2018
1 parent 499ce02 commit e068efa
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 10 deletions.
2 changes: 1 addition & 1 deletion stable/anchore-engine/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: anchore-engine
version: 0.2.2
version: 0.2.3
appVersion: 0.2.4
description: Anchore container analysis and policy evaluation engine service
keywords:
Expand Down
28 changes: 23 additions & 5 deletions stable/anchore-engine/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,30 @@ metadata:
{{ toYaml .Values.ingress.annotations | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
{{- if .Values.ingress.hosts }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $.Values.ingress.path }}
backend:
serviceName: "{{ template "fullname" $ }}"
servicePort: {{ $.Values.service.ports.api }}
{{- end }}
{{- else }}
backend:
serviceName: {{ template "fullname" . }}
servicePort: {{ .Values.service.ports.api }}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 2 }}
{{- end }}

{{- end -}}
{{- end -}}
13 changes: 9 additions & 4 deletions stable/anchore-engine/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,19 @@ image:
# Used to create Ingress record (should used with service.type: ClusterIP or NodePort depending on platform)
ingress:
enabled: false
annotations:
annotations: {}
# kubernetes.io/ingress.allow-http: False
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: true

path: /
# You can bound on specific hostnames
# hosts:
# - chart-example.local
tls: []
# Secrets must be manually created in the namespace.
tls:
# - secretName: tlstestsecret
# - secretName: chart-example-tls
# hosts:
# - chart-example.local

# Dependency on Postgresql, configure here
postgresql:
Expand Down

0 comments on commit e068efa

Please sign in to comment.