diff --git a/charts/guac/Chart.yaml b/charts/guac/Chart.yaml index 91e07cd..0b0fd48 100644 --- a/charts/guac/Chart.yaml +++ b/charts/guac/Chart.yaml @@ -9,8 +9,8 @@ maintainers: email: guac-info@kusari.dev type: application -version: 0.3.1 -appVersion: "v0.6.0" +version: 0.4.0 +appVersion: "v0.7.0" dependencies: - name: nats diff --git a/charts/guac/README.md b/charts/guac/README.md index cc2df67..3e91482 100644 --- a/charts/guac/README.md +++ b/charts/guac/README.md @@ -104,6 +104,7 @@ This section contains parameters for configuring the different GUAC components. | `guac.guacImage.workingDir` | Working Directory for GUAC | `/guac` | | `guac.common.env` | common environment variables apply to all guac services | `""` | | `guac.common.tolerations` | common tolerations apply to all guac services | `""` | +| `guac.configMap.enabled` | Whether to create the guac-cm configMap | `true` | | `guac.ociCollector.enabled` | String Whether to deploy OCI Collector | `true` | | `guac.ociCollector.name` | String Name of the OCI Collector component. | `oci-collector` | | `guac.ociCollector.annotations.reloader.stakater.com/auto` | Boolean for deploying [stakater/Reloader] (https://github.com/stakater/Reloader) | `""` | @@ -233,6 +234,7 @@ This section contains parameters for configuring the different GUAC components. | `guac.backend.ent.db-migrate` | Wether to automatically run database migrations on start | `true` | | `guac.backend.ent.db-debug` | Enable debug logging for database queries | `true` | | `guac.pubSubAddr` | String gocloud connection string for pubsub configured via https://gocloud.dev/howto/pubsub/ | `undefined` | +| `guac.collectorPublishToQueue` | Whether to publish ingestion message to pubsub queue | `true` | | `guac.blobAddr` | gocloud connection string for blob store configured via https://gocloud.dev/howto/blob/ | `undefined` | | `guac.additionalResources` | | `{}` | diff --git a/charts/guac/schema.json b/charts/guac/schema.json index 7e30f31..ce64c76 100644 --- a/charts/guac/schema.json +++ b/charts/guac/schema.json @@ -58,6 +58,16 @@ } } }, + "configMap": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether to create the guac-cm configMap", + "default": true + } + } + }, "ociCollector": { "type": "object", "properties": { @@ -893,6 +903,11 @@ } } }, + "collectorPublishToQueue": { + "type": "boolean", + "description": "Whether to publish ingestion message to pubsub queue", + "default": true + }, "additionalResources": { "type": "object", "description": "", diff --git a/charts/guac/templates/guac-cm.yaml b/charts/guac/templates/guac-cm.yaml index 41adefb..6ca812a 100644 --- a/charts/guac/templates/guac-cm.yaml +++ b/charts/guac/templates/guac-cm.yaml @@ -1,3 +1,4 @@ +{{ if .Values.guac.configMap.enabled }} # Copyright Kusari, Inc. and contributors # Licensed under the MIT license. See LICENSE file in the project root for details. --- @@ -14,6 +15,8 @@ data: pubsub-addr: nats://{{ .Release.Name }}-nats.{{ .Release.Namespace }}.svc.cluster.local:4222 {{- end }} + publish-to-queue: {{ $.Values.guac.collectorPublishToQueue }} + {{- if $.Values.guac.blobAddr }} blob-addr: {{ $.Values.guac.blobAddr }} {{- else }} @@ -50,3 +53,5 @@ data: {{ $key }}: {{ $val }} {{- end }} {{ end }} + +{{ end }} diff --git a/charts/guac/templates/ingest-guac-data-job.yaml b/charts/guac/templates/ingest-guac-data-job.yaml index 0b10089..8e17c50 100644 --- a/charts/guac/templates/ingest-guac-data-job.yaml +++ b/charts/guac/templates/ingest-guac-data-job.yaml @@ -121,6 +121,8 @@ data: ls -la ${SHARED_DATA}/guac-data/docs time /tmp/guaccollect files --service-poll=false ${SHARED_DATA}/guac-data/docs + sleep 3 + echo running guacone collect... time /tmp/guacone collect files ${SHARED_DATA}/guac-data/top-dh-sboms/zookeeper.json # for d in guac-data/docs diff --git a/charts/guac/tests/configmap_no_test.yaml b/charts/guac/tests/configmap_no_test.yaml new file mode 100644 index 0000000..9933f0f --- /dev/null +++ b/charts/guac/tests/configmap_no_test.yaml @@ -0,0 +1,13 @@ +# Copyright Kusari, Inc. and contributors +# Licensed under the MIT license. See LICENSE file in the project root for details. +suite: No ConfigMap test +templates: + - guac-cm.yaml + +tests: + - it: should not create ConfigMap + values: + - ./values_configmap_no.yaml + asserts: + - hasDocuments: + count: 0 diff --git a/charts/guac/tests/values_configmap_no.yaml b/charts/guac/tests/values_configmap_no.yaml new file mode 100644 index 0000000..034c7a7 --- /dev/null +++ b/charts/guac/tests/values_configmap_no.yaml @@ -0,0 +1,6 @@ +# Copyright Kusari, Inc. and contributors +# Licensed under the MIT license. See LICENSE file in the project root for details. +guac: + + configMap: + enabled: false \ No newline at end of file diff --git a/charts/guac/values.yaml b/charts/guac/values.yaml index 918653c..c0c4f9c 100644 --- a/charts/guac/values.yaml +++ b/charts/guac/values.yaml @@ -17,6 +17,7 @@ imagePullSecrets: ## @param guac.guacImage.workingDir Working Directory for GUAC ## @param guac.common.env [string] common environment variables apply to all guac services ## @param guac.common.tolerations [string] common tolerations apply to all guac services +## @param guac.configMap.enabled Whether to create the guac-cm configMap ## @param guac.ociCollector.enabled String Whether to deploy OCI Collector ## @param guac.ociCollector.name String Name of the OCI Collector component. ## @param guac.ociCollector.annotations.reloader.stakater.com/auto [string] Boolean for deploying [stakater/Reloader] (https://github.com/stakater/Reloader) @@ -146,6 +147,7 @@ imagePullSecrets: ## @param guac.backend.ent.db-migrate Wether to automatically run database migrations on start ## @param guac.backend.ent.db-debug Enable debug logging for database queries ## @param guac.pubSubAddr [nullable] String gocloud connection string for pubsub configured via https://gocloud.dev/howto/pubsub/ +## @param guac.collectorPublishToQueue Whether to publish ingestion message to pubsub queue ## @param guac.blobAddr [nullable] gocloud connection string for blob store configured via https://gocloud.dev/howto/blob/ ## @param guac.additionalResources guac: @@ -169,6 +171,9 @@ guac: value: secretKey tolerations: [] + configMap: + enabled: true + ociCollector: enabled: true name: oci-collector @@ -392,6 +397,8 @@ guac: # e.g. # pubSubAddr: awssqs://sqs.[aws_region].amazonaws.com/[account_id]/[queue_name]?region=[aws_region] + collectorPublishToQueue: true + # Default to use minio; specify a value here to override # e.g. # blobAddr: s3://[bucket_name]?region=[aws_region]