Skip to content

Commit

Permalink
Remove analyzer maxthreads (#326)
Browse files Browse the repository at this point in the history
* Remove anchoreConfig.analyzer.max_threads from 5.x charts
* update test snapshots

---------

Signed-off-by: Nicolas Simonds <[email protected]>
Signed-off-by: Brady Todhunter <[email protected]>
Co-authored-by: Nicolas Simonds <[email protected]>
  • Loading branch information
Btodhunter and nisimond authored Dec 19, 2023
1 parent fa576c4 commit ad1cb29
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 30 deletions.
2 changes: 1 addition & 1 deletion scripts/enterprise-value-converter/mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@
"anchore-feeds-gem-db.postgresUser": "feeds.gem-db.auth.username",


"anchoreAnalyzer.concurrentTasksPerWorker": "anchoreConfig.analyzer.max_threads",
"anchoreAnalyzer.containerPort": "analyzer.service.port",
"anchoreAnalyzer.enableHints": "anchoreConfig.analyzer.enable_hints",

Expand Down Expand Up @@ -292,6 +291,7 @@
"postgresql.persistence.resourcePolicy": "deprecated",
"anchoreGlobal.saml.useExistingSecret": "deprecated",
"anchoreEnterpriseReports.service.workerPort": "deprecated",
"anchoreAnalyzer.concurrentTasksPerWorker": "deprecated",
}

POST_PROCESSING = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,23 +227,6 @@ def test_anchoreAnalyzer_cycleTimers_image_analyzer_value(self):
result = replace_keys_with_mappings(dot_string_dict, self.results_dir)
self.assertEqual(result[0], expected_result)

def test_anchoreAnalyzer_concurrentTasksPerWorker_value(self):
dot_string_dict = {
"anchoreAnalyzer.concurrentTasksPerWorker": 1,
}
expected_result = {
'postgresql': {'auth': {'username': 'anchoreengine'}},
'anchoreConfig': {
'user_authentication': {'hashed_passwords': False},
'analyzer': {
'max_threads': 1
}
}

}
result = replace_keys_with_mappings(dot_string_dict, self.results_dir)
self.assertEqual(result[0], expected_result)

def test_anchoreAnalyzer_layerCacheMaxGigabytes_value(self):
dot_string_dict = {
"anchoreAnalyzer.layerCacheMaxGigabytes": 1,
Expand Down
2 changes: 1 addition & 1 deletion stable/enterprise/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: enterprise
version: "2.1.1"
version: "2.1.2"
appVersion: "5.1.0"
kubeVersion: 1.23.x - 1.28.x || 1.23.x-x - 1.28.x-x
description: |
Expand Down
1 change: 0 additions & 1 deletion stable/enterprise/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,6 @@ This rollback procedure is designed to revert your environment to its pre-migrat
| `anchoreConfig.apiext.external.hostname` | Hostname for the external Anchore API | `""` |
| `anchoreConfig.apiext.external.port` | Port configured for external Anchore API | `8443` |
| `anchoreConfig.analyzer.cycle_timers.image_analyzer` | The interval between checks of the work queue for new analysis jobs | `1` |
| `anchoreConfig.analyzer.max_threads` | The concurrency of the Anchore Analyzer worker process | `1` |
| `anchoreConfig.analyzer.layer_cache_max_gigabytes` | Specify a cache size > 0GB to enable image layer caching | `0` |
| `anchoreConfig.analyzer.enable_hints` | Enable a user-supplied 'hints' file to override and/or augment the software artifacts found during analysis | `false` |
| `anchoreConfig.analyzer.configFile` | Custom Anchore Analyzer configuration file contents in YAML | `{}` |
Expand Down
1 change: 0 additions & 1 deletion stable/enterprise/files/default_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ services:
max_request_threads: ${ANCHORE_MAX_REQUEST_THREADS}
cycle_timer_seconds: 1
cycle_timers: {{- toYaml .Values.anchoreConfig.analyzer.cycle_timers | nindent 6 }}
max_threads: ${ANCHORE_ANALYZER_MAX_THREADS}
analyzer_driver: 'nodocker'
layer_cache_enable: ${ANCHORE_LAYER_CACHE_ENABLED}
layer_cache_max_gigabytes: ${ANCHORE_LAYER_CACHE_SIZE_GB}
Expand Down
1 change: 0 additions & 1 deletion stable/enterprise/templates/envvars_configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ data:
ANCHORE_ADMIN_EMAIL: "{{ .Values.anchoreConfig.default_admin_email }}"
ANCHORE_ALLOW_ECR_IAM_AUTO: "{{ .Values.anchoreConfig.allow_awsecr_iam_auto }}"
ANCHORE_ANALYZER_TASK_REQUEUE: "true"
ANCHORE_ANALYZER_MAX_THREADS: "{{ .Values.anchoreConfig.analyzer.max_threads }}"
ANCHORE_AUTH_ENABLE_HASHED_PASSWORDS: "{{ .Values.anchoreConfig.user_authentication.hashed_passwords }}"
{{- with .Values.anchoreConfig.keys.publicKeyFileName }}
ANCHORE_AUTH_PRIVKEY: "/home/anchore/certs/{{- . }}"
Expand Down
2 changes: 0 additions & 2 deletions stable/enterprise/tests/__snapshot__/configmap_test.yaml.snap
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ should render the configmaps:
cycle_timer_seconds: 1
cycle_timers:
image_analyzer: 1
max_threads: ${ANCHORE_ANALYZER_MAX_THREADS}
analyzer_driver: 'nodocker'
layer_cache_enable: ${ANCHORE_LAYER_CACHE_ENABLED}
layer_cache_max_gigabytes: ${ANCHORE_LAYER_CACHE_SIZE_GB}
Expand Down Expand Up @@ -375,7 +374,6 @@ should render the configmaps:
data:
ANCHORE_ADMIN_EMAIL: admin@myanchore
ANCHORE_ALLOW_ECR_IAM_AUTO: "true"
ANCHORE_ANALYZER_MAX_THREADS: "1"
ANCHORE_ANALYZER_TASK_REQUEUE: "true"
ANCHORE_AUTH_ENABLE_HASHED_PASSWORDS: "true"
ANCHORE_AUTH_PRIVKEY: "null"
Expand Down
6 changes: 0 additions & 6 deletions stable/enterprise/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,6 @@ anchoreConfig:
cycle_timers:
image_analyzer: 1

## @param anchoreConfig.analyzer.max_threads The concurrency of the Anchore Analyzer worker process
## Can be configured to process more than one task at a time. This is IO bound so may not necessarily be faster depending on hardware.
## Operators should test and balance this value vs. number of Anchore Analyzer replicas deployed.
##
max_threads: 1

## @param anchoreConfig.analyzer.layer_cache_max_gigabytes Specify a cache size > 0GB to enable image layer caching
## This chart sets up a scratch directory for all Anchore Analyzer pods using the values found at .Values.scratchVolume
## When setting .Values.anchoreConfig.analyzer.layer_cache_max_gigabytes, ensure the scratch volume has sufficient storage space
Expand Down

0 comments on commit ad1cb29

Please sign in to comment.