diff --git a/charts/philter/Chart.yaml b/charts/philter/Chart.yaml index 7bf4f72..1868823 100644 --- a/charts/philter/Chart.yaml +++ b/charts/philter/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.9 +version: 0.1.10 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/philter/templates/ph-eye/deployment.yaml b/charts/philter/templates/ph-eye/deployment.yaml index f6a2757..81c3d37 100644 --- a/charts/philter/templates/ph-eye/deployment.yaml +++ b/charts/philter/templates/ph-eye/deployment.yaml @@ -4,7 +4,7 @@ kind: Deployment metadata: name: {{ include "philter.phEyeFullname" . }} labels: - {{- include "philter.labels" . | nindent 4 }} + {{- include "philter.phEyeLabels" . | nindent 4 }} spec: {{- if not .Values.phEye.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} diff --git a/charts/philter/templates/philter-api/configmap.yaml b/charts/philter/templates/philter-api/configmap.yaml new file mode 100644 index 0000000..92bd1be --- /dev/null +++ b/charts/philter/templates/philter-api/configmap.yaml @@ -0,0 +1,16 @@ +{{- if .Values.policies.createConfigMap }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "philter.fullname" . }}-policies + labels: + {{- include "philter.labels" . | nindent 4 }} + {{- if .Values.policies.configMapAnnotations }} + annotations: + {{- with .Values.policies.configMapAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- end }} +data: + {{- toYaml .Values.policies.data | nindent 2 }} +{{- end }} diff --git a/charts/philter/templates/philter-api/deployment.yaml b/charts/philter/templates/philter-api/deployment.yaml index e92f140..eaf44af 100644 --- a/charts/philter/templates/philter-api/deployment.yaml +++ b/charts/philter/templates/philter-api/deployment.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: name: {{ include "philter.apiFullname" . }} labels: - {{- include "philter.labels" . | nindent 4 }} + {{- include "philter.apiLabels" . | nindent 4 }} spec: {{- if not .Values.api.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} @@ -13,10 +13,14 @@ spec: {{- include "philter.apiSelectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.api.podAnnotations }} annotations: + {{- if .Values.policies.createConfigMap }} + checksum/policies-json-config: {{ include (print $.Template.BasePath "/philter-api/configmap.yaml") . | sha256sum }} + {{- end }} + + {{- with .Values.api.podAnnotations }} {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} labels: {{- include "philter.apiLabels" . | nindent 8 }} {{- with .Values.api.podLabels }} @@ -50,14 +54,24 @@ spec: {{- toYaml .Values.api.readinessProbe | nindent 12 }} resources: {{- toYaml .Values.api.resources | nindent 12 }} - {{- with .Values.api.volumeMounts }} volumeMounts: + {{- if .Values.policies.createConfigMap }} + - name: {{ include "philter.fullname" . }}-policies + mountPath: "/opt/philter/policies/" + {{- end }} + + {{- with .Values.api.volumeMounts }} {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.api.volumes }} + {{- end }} volumes: + {{- if .Values.policies.createConfigMap }} + - name: policies + configMap: + name: {{ include "philter.fullname" . }}-policies + {{- end }} + {{- with .Values.api.volumes }} {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} {{- with .Values.api.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/philter/templates/philter-ui/deployment.yaml b/charts/philter/templates/philter-ui/deployment.yaml index 85e62fd..edc9001 100644 --- a/charts/philter/templates/philter-ui/deployment.yaml +++ b/charts/philter/templates/philter-ui/deployment.yaml @@ -4,7 +4,7 @@ kind: Deployment metadata: name: {{ include "philter.uiFullname" . }} labels: - {{- include "philter.labels" . | nindent 4 }} + {{- include "philter.uiLabels" . | nindent 4 }} spec: {{- if not .Values.ui.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} diff --git a/charts/philter/values.yaml b/charts/philter/values.yaml index 3fd5a58..294510f 100644 --- a/charts/philter/values.yaml +++ b/charts/philter/values.yaml @@ -27,6 +27,98 @@ ingress: # hosts: # - chart-example.local +policies: + createConfigMap: true + + configMapAnnotations: {} + + data: + default.json: | + { + "name": "default", + "config": { + "splitting": { + "enabled": true, + "threshold": 384, + "method": "width" + } + }, + "ignored": [], + "identifiers": { + "dictionaries": [], + "person": { + "phEyeConfiguration": { + "endpoint": "http://philter-ph-eye:5000" + }, + "personFilterStrategies": [{ + "strategy": "REDACT", + "redactionFormat": "{{{REDACTED-%t}}}" + }] + }, + "age": { + "ageFilterStrategies": [{ + "strategy": "REDACT", + "redactionFormat": "{{{REDACTED-%t}}}" + }] + }, + "creditCard": { + "creditCardFilterStrategies": [{ + "strategy": "REDACT", + "redactionFormat": "{{{REDACTED-%t}}}" + }] + }, + "date": { + "dateFilterStrategies": [{ + "strategy": "REDACT", + "redactionFormat": "{{{REDACTED-%t}}}" + }] + }, + "emailAddress": { + "emailAddressFilterStrategies": [{ + "strategy": "REDACT", + "redactionFormat": "{{{REDACTED-%t}}}" + }] + }, + "ipAddress": { + "ipAddressFilterStrategies": [{ + "strategy": "REDACT", + "redactionFormat": "{{{REDACTED-%t}}}" + }] + }, + "phoneNumber": { + "phoneNumberFilterStrategies": [{ + "strategy": "REDACT", + "redactionFormat": "{{{REDACTED-%t}}}" + }] + }, + "ssn": { + "ssnFilterStrategies": [{ + "strategy": "REDACT", + "redactionFormat": "{{{REDACTED-%t}}}" + }] + }, + "url": { + "urlFilterStrategies": [{ + "strategy": "REDACT", + "redactionFormat": "{{{REDACTED-%t}}}" + }] + }, + "vin": { + "vinFilterStrategies": [{ + "strategy": "REDACT", + "redactionFormat": "{{{REDACTED-%t}}}" + }] + }, + "zipCode": { + "zipCodeFilterStrategy": [{ + "strategy": "REDACT", + "redactionFormat": "{{{REDACTED-%t}}}" + }] + } + } + } + + # This block is for setting up an HTTPRoute for more information can be found here: https://gateway-api.sigs.k8s.io/api-types/httproute/ httpRoute: enabled: false