Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow override of entire db_connect_args, not just single values #376

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.5.6"
version: "2.5.7"
appVersion: "5.4.1"
kubeVersion: 1.23.x - 1.28.x || 1.23.x-x - 1.29.x-x
description: |
Expand Down
3 changes: 2 additions & 1 deletion stable/enterprise/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ This rollback procedure is designed to revert your environment to its pre-migrat
### Anchore Configuration Parameters

| Name | Description | Value |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
|----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------| ------------------ |
| `anchoreConfig.service_dir` | Path to directory where default Anchore config files are placed at startup | `/anchore_service` |
| `anchoreConfig.log_level` | The log level for Anchore services | `INFO` |
| `anchoreConfig.allow_awsecr_iam_auto` | Enable AWS IAM instance role for ECR auth | `true` |
Expand Down Expand Up @@ -995,6 +995,7 @@ This rollback procedure is designed to revert your environment to its pre-migrat
| `anchoreConfig.database.db_pool_size` | The database max connection pool size | `30` |
| `anchoreConfig.database.db_pool_max_overflow` | The maximum overflow size of the database connection pool | `100` |
| `anchoreConfig.database.engineArgs` | Set custom database engine arguments for SQLAlchemy | `{}` |
| `anchoreConfig.database.dbConnectArgs` | Set custom database connection arguments for SQLAlchemy. This is mutually exclusive with ssl, sslmode, and sslRootCertFilename | `{}` |
| `anchoreConfig.internalServicesSSL.enabled` | Force all Enterprise services to use SSL for internal communication | `false` |
| `anchoreConfig.internalServicesSSL.verifyCerts` | Enable cert verification against the local cert bundle, if this set to false self-signed certs are allowed | `false` |
| `anchoreConfig.internalServicesSSL.certSecretKeyFileName` | File name of the private key used for internal SSL stored in the secret specified in .Values.certStoreSecretName | `""` |
Expand Down
6 changes: 6 additions & 0 deletions stable/enterprise/files/default_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,19 @@ credentials:
host: "${ANCHORE_DB_HOST}"
port: "${ANCHORE_DB_PORT}"
name: "${ANCHORE_DB_NAME}"
{{- if .Values.anchoreConfig.database.dbConnectArgs }}
{{- with .Values.anchoreConfig.database.dbConnectArgs }}
db_connect_args: {{- toYaml . | nindent 6 }}
{{- end }}
{{- else }}
db_connect_args:
timeout: ${ANCHORE_DB_TIMEOUT}
ssl: ${ANCHORE_DB_SSL}
{{- if .Values.anchoreConfig.database.ssl }}
sslmode: ${ANCHORE_DB_SSL_MODE}
sslrootcert: ${ANCHORE_DB_SSL_ROOT_CERT}
{{- end }}
{{- end }}
db_pool_size: ${ANCHORE_DB_POOL_SIZE}
db_pool_max_overflow: ${ANCHORE_DB_POOL_MAX_OVERFLOW}
{{- with .Values.anchoreConfig.database.engineArgs }}
Expand Down
1 change: 1 addition & 0 deletions stable/enterprise/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ anchoreConfig:
db_pool_size: 30
db_pool_max_overflow: 100
engineArgs: {}
dbConnectArgs: {}

## @param anchoreConfig.internalServicesSSL.enabled Force all Enterprise services to use SSL for internal communication
## @param anchoreConfig.internalServicesSSL.verifyCerts Enable cert verification against the local cert bundle, if this set to false self-signed certs are allowed
Expand Down