From e068efa22043ea68fa35480e94ab4d9966be7b1b Mon Sep 17 00:00:00 2001 From: Maxime VISONNEAU Date: Tue, 25 Sep 2018 17:40:50 +0100 Subject: [PATCH] Enhanced ingress configuration on anchore-engine chart (#7798) Signed-off-by: Maxime VISONNEAU --- stable/anchore-engine/Chart.yaml | 2 +- stable/anchore-engine/templates/ingress.yaml | 28 ++++++++++++++++---- stable/anchore-engine/values.yaml | 13 ++++++--- 3 files changed, 33 insertions(+), 10 deletions(-) diff --git a/stable/anchore-engine/Chart.yaml b/stable/anchore-engine/Chart.yaml index 544c54d7f0..2e4873e286 100644 --- a/stable/anchore-engine/Chart.yaml +++ b/stable/anchore-engine/Chart.yaml @@ -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: diff --git a/stable/anchore-engine/templates/ingress.yaml b/stable/anchore-engine/templates/ingress.yaml index 8007777253..3835f1a681 100644 --- a/stable/anchore-engine/templates/ingress.yaml +++ b/stable/anchore-engine/templates/ingress.yaml @@ -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 -}} \ No newline at end of file +{{- end -}} diff --git a/stable/anchore-engine/values.yaml b/stable/anchore-engine/values.yaml index 37fd0a8629..4abd723a80 100644 --- a/stable/anchore-engine/values.yaml +++ b/stable/anchore-engine/values.yaml @@ -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: