Skip to content

Commit

Permalink
Merge pull request #55 from sunnyyip/guac-0-8-1
Browse files Browse the repository at this point in the history
add latency and batchsize support
  • Loading branch information
pxp928 authored Jul 31, 2024
2 parents a43f0f1 + c09fe4d commit e1a0bdd
Show file tree
Hide file tree
Showing 7 changed files with 211 additions and 155 deletions.
2 changes: 1 addition & 1 deletion charts/guac/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ maintainers:
email: [email protected]

type: application
version: 0.5.0
version: 0.5.1
appVersion: "v0.8.0"

dependencies:
Expand Down
311 changes: 157 additions & 154 deletions charts/guac/README.md

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions charts/guac/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@
"type": "string",
"description": "Day(s) to wait before the certifier rescanning - commonly apply to all certifiers. Default 0 means only run once",
"default": "0"
},
"batchSize": {
"type": "string",
"description": "sets the batch size for pagination query for the certifier - commonly apply to all certifiers. Default 60000",
"default": "60000"
},
"latency": {
"type": "object",
"description": "sets artificial latency on the certifier - commonly apply to all certifiers. Defaults to empty string (not enabled) but can set m, h, s...etc.",
"default": null,
"nullable": true
}
}
}
Expand Down Expand Up @@ -223,6 +234,12 @@
"type": "object",
"description": "- [map] resource requests or limits of the depsDevCollector deployment",
"default": {}
},
"depsDevLatency": {
"type": "object",
"description": "- sets artificial latency on the deps.dev collector. Defaults to empty string (not enabled) but can set m, h, s...etc.",
"default": null,
"nullable": true
}
}
},
Expand Down
7 changes: 7 additions & 0 deletions charts/guac/templates/guac-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ data:
{{- if $.Values.guac.common.certifier.dayBetweenRescan }}
last-scan: {{ .Values.guac.common.certifier.dayBetweenRescan }}
{{- end }}
{{- if $.Values.guac.common.certifier.batchSize }}
certifier-batch-size: {{ .Values.guac.common.certifier.batchSize }}
{{- end }}
{{- if $.Values.guac.common.certifier.latency }}
certifier-latency: {{ .Values.guac.common.certifier.latency }}
{{- end }}

poll: true
interval: 5m # how often to poll graphql-server to discover new packages

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ tests:
- it: configmap should render
values:
- ./values_ent_backend.yaml
- ./values_common_certifier.yaml
asserts:
- isKind:
of: ConfigMap
Expand All @@ -26,3 +27,17 @@ tests:
# - equal:
# path: data["guac.yaml"]["db-migrate"]
# value: true

# - it: should override defaults
# values:
# - ./values_common_certifier.yaml
# asserts:
# - equal:
# path: data.guac\.yaml.last-scan
# value: "5"
# - equal:
# path: data.guac/.yaml.certifier-batch-size
# value: "50000"
# - equal:
# path: data.guac/.yaml.certifier-latency
# value: 5s
8 changes: 8 additions & 0 deletions charts/guac/tests/values_common_certifier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright Kusari, Inc. and contributors
# Licensed under the MIT license. See LICENSE file in the project root for details.
guac:
common:
certifier:
dayBetweenRescan: "5"
batchSize: "50000"
latency: "5s"
6 changes: 6 additions & 0 deletions charts/guac/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ imagePullSecrets:
## @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.common.certifier.dayBetweenRescan Day(s) to wait before the certifier rescanning - commonly apply to all certifiers. Default 0 means only run once
## @param guac.common.certifier.batchSize sets the batch size for pagination query for the certifier - commonly apply to all certifiers. Default 60000
## @param guac.common.certifier.latency [nullable] sets artificial latency on the certifier - commonly apply to all certifiers. Defaults to empty string (not enabled) but can set m, h, s...etc.
## @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.
Expand All @@ -41,6 +43,7 @@ imagePullSecrets:
## @param guac.depsDevCollector.serviceAccount.create - whether to create depsDevCollector service account
## @param guac.depsDevCollector.serviceAccount.annotations
## @param guac.depsDevCollector.resources - [map] resource requests or limits of the depsDevCollector deployment
## @param guac.depsDevCollector.depsDevLatency [nullable] - sets artificial latency on the deps.dev collector. Defaults to empty string (not enabled) but can set m, h, s...etc.
## @param guac.osvCertifier.enabled String Whether to deploy OSV Certifier
## @param guac.osvCertifier.name String Name of the OSV Certifier component.
## @param guac.osvCertifier.annotations.reloader.stakater.com/auto [string] Boolean for deploying [stakater/Reloader] (https://github.com/stakater/Reloader)
Expand Down Expand Up @@ -185,6 +188,8 @@ guac:

certifier:
dayBetweenRescan: "0"
batchSize: "60000"
latency:

configMap:
enabled: true
Expand Down Expand Up @@ -226,6 +231,7 @@ guac:
# requests:
# cpu: "0.25"
# memory: "0.5G"
depsDevLatency:

osvCertifier:
enabled: true
Expand Down

0 comments on commit e1a0bdd

Please sign in to comment.