diff --git a/stable/anchore-engine/Chart.yaml b/stable/anchore-engine/Chart.yaml index 39a0cd032a..c06e578a74 100644 --- a/stable/anchore-engine/Chart.yaml +++ b/stable/anchore-engine/Chart.yaml @@ -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: diff --git a/stable/anchore-engine/templates/enterprise_ui_config.yaml b/stable/anchore-engine/templates/enterprise_ui_config.yaml new file mode 100644 index 0000000000..e3d42a2ccb --- /dev/null +++ b/stable/anchore-engine/templates/enterprise_ui_config.yaml @@ -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 -}} diff --git a/stable/anchore-engine/templates/enterprise_ui_deployment.yaml b/stable/anchore-engine/templates/enterprise_ui_deployment.yaml index 2d995314e5..4a168d5a7b 100644 --- a/stable/anchore-engine/templates/enterprise_ui_deployment.yaml +++ b/stable/anchore-engine/templates/enterprise_ui_deployment.yaml @@ -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 }}