Temporary fix for enterprise UI session bloat (#12469)

* update liveness & remove readiness probes on UI pod.
* add config secret & mount to UI pod.

Signed-off-by: Brady Todhunter <bradyt@anchore.com>
This commit is contained in:
Brady Todhunter
2019-03-22 21:23:06 -07:00
committed by Kubernetes Prow Robot
parent 11534af5a2
commit f185521db1
3 changed files with 50 additions and 14 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: anchore-engine
version: 0.12.0
version: 0.12.1
appVersion: 0.3.3
description: Anchore container analysis and policy evaluation engine service
keywords:
@@ -0,0 +1,31 @@
{{- if and .Values.anchoreEnterpriseGlobal.enabled .Values.anchoreEnterpriseUi.enabled -}}
{{- $component := "enterprise-ui" -}}
# Using a secret until UI app supports ENV vars inside the config file. Redis password is included in config.
kind: Secret
apiVersion: v1
metadata:
name: {{ include "anchore-engine.enterprise-ui.fullname" . | quote }}
labels:
app: {{ include "anchore-engine.fullname" . | quote }}
component: {{ $component }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
type: Opaque
stringData:
config-ui.yaml: |
engine_uri: 'http://{{ template "anchore-engine.api.fullname" . }}:{{ .Values.anchoreApi.service.port }}/v1'
{{- if and (index .Values "anchore-ui-redis" "externalEndpoint") (not (index .Values "anchore-ui-redis" "enabled")) }}
redis_uri: '{{ index .Values "anchore-ui-redis" "externalEndpoint" }}'
{{- else }}
redis_uri: 'redis://:{{ index .Values "anchore-ui-redis" "password" }}@{{ template "redis.fullname" . }}-master:6379'
{{- end }}
{{- if .Values.anchoreEnterpriseRbac.enabled }}
rbac_uri: 'http://{{ template "anchore-engine.api.fullname" . }}:{{ .Values.anchoreEnterpriseRbac.service.apiPort }}/v1'
{{- end }}
license_path: '/'
enable_ssl: {{ .Values.anchoreEnterpriseUi.enableSsl }}
enable_proxy: {{ .Values.anchoreEnterpriseUi.enableProxy }}
allow_shared_login: {{ .Values.anchoreEnterpriseUi.enableSharedLogin }}
{{- end -}}
@@ -34,6 +34,9 @@ spec:
- name: anchore-license
secret:
secretName: {{ .Values.anchoreEnterpriseGlobal.licenseSecretName }}
- name: anchore-ui-config
secret:
secretName: {{ template "anchore-engine.enterprise-ui.fullname" . }}
imagePullSecrets:
- name: {{ .Values.anchoreEnterpriseGlobal.imagePullSecretName }}
containers:
@@ -49,15 +52,15 @@ spec:
- name: {{ $key }}
value: {{ $value }}
{{- end }}
{{- if and (index .Values "anchore-ui-redis" "externalEndpoint") (not (index .Values "anchore-ui-redis" "enabled")) }}
- name: ANCHORE_REDIS_URI
value: {{ index .Values "anchore-ui-redis" "externalEndpoint" | quote }}
{{- else }}
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "redis.fullname" . }}
key: redis-password
{{- if and (index .Values "anchore-ui-redis" "externalEndpoint") (not (index .Values "anchore-ui-redis" "enabled")) }}
- name: ANCHORE_REDIS_URI
value: {{ index .Values "anchore-ui-redis" "externalEndpoint" | quote }}
{{- else }}
- name: ANCHORE_REDIS_URI
value: "redis://:$(REDIS_PASSWORD)@{{ template "redis.fullname" . }}-master:6379"
{{- end }}
@@ -83,21 +86,23 @@ spec:
- name: anchore-license
mountPath: /license.yaml
subPath: license.yaml
- name: anchore-ui-config
mountPath: /config/config-ui.yaml
subPath: config-ui.yaml
livenessProbe:
httpGet:
path: /
tcpSocket:
port: enterprise-ui
initialDelaySeconds: 120
periodSeconds: 10
failureThreshold: 6
successThreshold: 1
readinessProbe:
httpGet:
path: /service/health
port: enterprise-ui
periodSeconds: 10
failureThreshold: 3
successThreshold: 1
# readinessProbe:
# httpGet:
# path: /service/health
# port: enterprise-ui
# periodSeconds: 10
# failureThreshold: 3
# successThreshold: 1
resources:
{{ toYaml .Values.anchoreEnterpriseUi.resources | indent 10 }}
{{- if .Values.anchoreEnterpriseUi.nodeSelector }}