From 3fb18bd971c095b323a71765c1e9aabb9020cfe3 Mon Sep 17 00:00:00 2001 From: Denislite Date: Tue, 2 Aug 2022 19:08:08 +0300 Subject: [PATCH] Project dependency fixes, README file update --- .editorconfig | 2 +- README.md | 10 +++++----- .../database-to-integrity-sum/templates/secrets.yaml | 2 +- helm-charts/database-to-integrity-sum/values.yaml | 8 ++++---- .../demo-apps-to-monitor/templates/configMap.yaml | 2 +- .../demo-apps-to-monitor/templates/deployment.yaml | 6 +++--- .../mutator/templates/webhook-configuration.yaml | 2 +- helm-charts/mutator/values.yaml | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.editorconfig b/.editorconfig index f190a6b..db7cbe0 100644 --- a/.editorconfig +++ b/.editorconfig @@ -18,4 +18,4 @@ trim_trailing_whitespace = false eclint_indent_style = unset [Dockerfile] -indent_size = 4 \ No newline at end of file +indent_size = 4 diff --git a/README.md b/README.md index 71f1db1..d1b190c 100644 --- a/README.md +++ b/README.md @@ -66,15 +66,15 @@ Then update the on-disk dependencies to mirror Chart.yaml. ``` helm dependency update helm-charts/database-to-integrity-sum ``` -INSERT TEXT HERE +Then install the database helm-chart on your cluster. ``` -helm install helm-charts/database-to-integrity-sum +helm install db helm-charts/database-to-integrity-sum ``` -INSERT TEXT HERE +And also install the mutating injector app. ``` -helm install db helm-charts/mutator +helm install mutator helm-charts/mutator ``` -INSERT TEXT HERE +For a demonstration of work, use demo-app. ``` helm install app helm-charts/demo-apps-to-monitor ``` diff --git a/helm-charts/database-to-integrity-sum/templates/secrets.yaml b/helm-charts/database-to-integrity-sum/templates/secrets.yaml index 1d79e15..351a697 100644 --- a/helm-charts/database-to-integrity-sum/templates/secrets.yaml +++ b/helm-charts/database-to-integrity-sum/templates/secrets.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: {{.Release.Name}}-{{ .Values.secretName}} + name: {{ .Values.secretName}} namespace: {{ .Release.Namespace }} type: Opaque stringData: # We dont need to worry about converting to base64 diff --git a/helm-charts/database-to-integrity-sum/values.yaml b/helm-charts/database-to-integrity-sum/values.yaml index f38e102..e4e1d93 100644 --- a/helm-charts/database-to-integrity-sum/values.yaml +++ b/helm-charts/database-to-integrity-sum/values.yaml @@ -1,5 +1,5 @@ # Dependency to database "postgresql" -secretName: secret-database-to-integrety-sum # Set the unique name for secret for database +secretName: hasher-database-secret # Set the unique name for secret for database postgresql: auth: @@ -16,10 +16,10 @@ postgresql: # Set by the initdb script during initial container startup 00_init_extensions.sh: | #!/bin/sh - export PGPASSWORD=$POSTGRES_PASSWORD + export PGPASSWORD=$POSTGRES_PASSWORD psql -w -d $POSTGRES_DB -U $POSTGRES_USER -c " - CREATE TABLE IF NOT EXISTS hashfiles - ( + CREATE TABLE IF NOT EXISTS hashfiles + ( id BIGSERIAL PRIMARY KEY, file_name VARCHAR NOT NULL, full_file_path TEXT NOT NULL, diff --git a/helm-charts/demo-apps-to-monitor/templates/configMap.yaml b/helm-charts/demo-apps-to-monitor/templates/configMap.yaml index 4292472..3a280d7 100644 --- a/helm-charts/demo-apps-to-monitor/templates/configMap.yaml +++ b/helm-charts/demo-apps-to-monitor/templates/configMap.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: hasher-config + name: {{ .Release.Name }}-integrity-sum-config data: {{ .Values.container.name }}: | PID_NAME={{ .Values.configMap.processName }} diff --git a/helm-charts/demo-apps-to-monitor/templates/deployment.yaml b/helm-charts/demo-apps-to-monitor/templates/deployment.yaml index 5c5ef57..516e5d8 100644 --- a/helm-charts/demo-apps-to-monitor/templates/deployment.yaml +++ b/helm-charts/demo-apps-to-monitor/templates/deployment.yaml @@ -18,8 +18,8 @@ spec: metadata: labels: app: {{ .Values.metadata.appName }} - hasher-webhook-process-name: "{{ .Values.processName }}" - hasher-webhook-injector-sidecar: "true" + main-process-name: "{{ .Values.configMap.processName }}" + hasher-certificates-injector-sidecar: "true" spec: serviceAccountName: {{ .Values.serviceAccount }} shareProcessNamespace: true @@ -27,4 +27,4 @@ spec: - name: {{ .Values.container.name }} image: {{ .Values.container.image }} stdin: true - tty: true \ No newline at end of file + tty: true diff --git a/helm-charts/mutator/templates/webhook-configuration.yaml b/helm-charts/mutator/templates/webhook-configuration.yaml index 7fa376f..14b2405 100644 --- a/helm-charts/mutator/templates/webhook-configuration.yaml +++ b/helm-charts/mutator/templates/webhook-configuration.yaml @@ -18,4 +18,4 @@ webhooks: resources: ["pods"] admissionReviewVersions: ["v1", "v1beta1"] sideEffects: None - timeoutSeconds: 5 \ No newline at end of file + timeoutSeconds: 5 diff --git a/helm-charts/mutator/values.yaml b/helm-charts/mutator/values.yaml index 74a1983..83de7c7 100644 --- a/helm-charts/mutator/values.yaml +++ b/helm-charts/mutator/values.yaml @@ -7,7 +7,7 @@ mountPath: /ssl namespaceDep: default # namespace of cluster contName: k8s-webhook-injector-ws # name of the container -image: dyslexicat/tcpdump-webhook # image name +image: mutator:latest # image name pullPolicy: Never # pull policy for image containerPort: 8443 # port for the container @@ -36,4 +36,4 @@ path: "/mutate" namespaceService: default # namespace of cluster port: 443 # port of this service -targetPort: 8443 # port to accept traffic on \ No newline at end of file +targetPort: 8443 # port to accept traffic on