Configure Binarly charts
This page describes how to configure the Binarly charts for your deployment. The configuration is done through a values file that is passed to the Helm chart during installation, and secrets set up prior to the installation.Binarly Secrets
The following table details secrets that are required by the platform. It is recommended to use a more secure method of managing the manual secrets such as the External Secrets Operator or Sealed Secrets. The secrets and their uses are as follows (This list is not exhaustive):| Secret Name | Description | Usage | Deployment |
|---|---|---|---|
| keycloak | Keycloak admin user credentials | Used by Keycloak for authentication | Automatic |
| keycloak-database-connection | Keycloak database connection details | Used by Keycloak to connect to the database. If using the built-in database, these details are automatically managed. | Automatic |
| server-database-connection | Server database connection details | Used by the Binarly Server to connect to the database. If using the built-in database, these details are automatically managed. | Automatic |
| nvd-api-key | NVD API key for accessing the National Vulnerability Database | Used by the vulnerability database to fetch vulnerability data. Provided by customer support. | Manual |
| binarly-registry | Docker registry credentials for Binarly images | Used to pull Binarly images from the provided private registry. | Manual |
| docker-login-credentials | Docker registry credentials for pulling images | Used to pull images from the specified Docker registry. | Manual |
| server-integration-secret | Integration secret for the Binarly Server | Used by the Binarly Server. | Manual |
Deploying the Secrets
Secrets should be deployed prior to installation. Any method to deploy the secrets will work and the following are provided as examples. Additional resources (Like ExternalSecrets) can be passed using theextraResources value, see here for configuration.
Manual Secret Deployment
Manual Secret Deployment
It is recommended to use a more secure method of managing the secrets such as the External Secrets Operator or Sealed Secrets. To detail the structure of the secrets, here are examples of how to manually create the required secrets using kubernetes manifests.The Docker Config JSON can be constructed using the following template:
With External Secrets Operator
With External Secrets Operator
The External Secrets Operator can be used to manage secrets more securely. Here is an example of how to define an external secret for the binarly registry:Where the
binarly-registry secret in your secret store contains the following JSON structure:With Sealed Secrets
With Sealed Secrets
Sealed Secrets can be used to manage secrets more securely. Here is an example of how to define a sealed secret for the binarly registry:The encrypted docker config JSON would look like the following before encryption:
Values
A minimal deployment requires setting the following values in another file, e.g.specific-values.yaml:
Please do not uses these values as-is, they must be adapted to your environment.
Extra Resources
The Chart contains anextraResources section that allows you to deploy additional resources alongside the main chart. This can be used to deploy custom ConfigMaps, Secrets, or other Kubernetes resources that are not part of the main chart. This is useful for adding custom configurations or additional components that are not included in the chart by default, and are specific to your environment.
For example:
test-config and an ExternalSecret named my-external-secret. This is an alternative to creating a wrapper chart around this chart.
Upgrading
The chart follows the semantic versioning convention so any breaking changes will be reflected in the major version number. Any other changes should be backwards compatible. To prevent constant major version updates some values are deprecated but not removed. When there is a breaking change released all deprecated values will be removed and a notice posted on this readme with upgrade instructions. Pre-upgrade, please ensure the Database is backed up. This depends on your deployment method, but if you are using the built-in PostgreSQL database, you can use thepg_dump command to create a backup of the database. If you are using an external database, please refer to your database provider’s documentation for backup instructions.
ArgoCD and FluxCD
Upgrades involving minor or patch versions should be carried out depending on your installation method. If you are using ArgoCD or FluxCD, the upgrade will be handled by updating the version on your Application or HelmRelease.Helm
If you are using Helm, you can upgrade the chart using the following command:Rollback
There are two rollback scenarios to consider:No Migrations
If the upgrade does not include any database migrations, you can simply rollback to the previous version using the following command:With Migrations
Migrations are not backwards compatible so if the upgrade includes database migrations, you will need to restore the database from a backup. This can be done using thepg_restore command for PostgreSQL databases. If you are using an external database, please refer to your database provider’s documentation for rollback instructions.
During the restore process you will need to disable the Binarly Server and VDB components to prevent them from trying to access the database while it is being restored. This can be done by setting the server.enabled and vulnerability-database.enabled values to false in the values.yaml file, or by using the --set flag when running the helm upgrade command. After this, restore the database and restart the components by setting the values back to true and running the helm upgrade command again.
High Availability
The chart contains partial support for high availability. The following components can be deployed in a highly available configuration:- Keycloak
- Dashboard
- VDB
Ingress
Ingress is currently provisioned from the dashboard, minio-buckets, and keycloak chart. This will be simplified in the future and require fewer values.basedomain is base domain name for Binarly Transparency Platform:
dashboard.binarly.domain.comfor the Binarly Dashboardkeycloak.binarly.domain.comfor Keycloakminio-api.binarly.domain.comfor MinIO
Observability
The BTP Chart emits a variety of metrics, logs, and traces to help you monitor the health and performance of the applications.Metrics
Metrics can be collected from prometheus metrics endpoints exposed by the various components. The following components expose metrics:- Keycloak
- Server API
- Server Scanner
- Argo Workflows
- Minio
Logs
Logs are output to Stdout and Stderr in JSON format by default.Traces
Traces are produced in OpenTelemetry format from the following components:- Server API
- Server Scanner
Role-Based Access Control (RBAC)
By default all access is managed via Keycloak. To enable RBAC, you can set the following values:Custom Rules
To use the Custom Rules feature in an on-premise installtion, an installation of Harbor is required to manage the artefacts used by the system, and the user’s credentials must be available to the binarly application. Harbor can be deployed on kubernetes using the helm chart:- A user has been provisioned on the harbor instance
- The user has access to a project with a name defined in global.clusterName as above
Air Gapped Environment
The Binarly Application will work in an air-gapped environment with a few caveats:- There must be an internal registry capable of hosting images and charts.
- Chart addresses must be updated to use the internal registry.
- Image repository fields must be overwritten to use the internal registry.
- One component of the Binarly Application (Vulnerability Database) requires internet access to fetch vulnerability data.
Internal Registry
The registry in use should be populated with the contents of the private Binarly registry provided by Customer Success. The exact contents will be communicated prior to the installation.Images
In case you wish to distribute artifacts with your chosen artifact registry, we recommend using thehelm images plugin. Further details on this plugin can be found in artifactHUB
Installation of this plugin is simple as
Vulnerability Database
The Vulnerability Database component of the Binarly Application requires internet access to fetch vulnerability data. This can be achieved by setting up a proxy server that allows the Vulnerability Database to access the internet, and passing this config ink8s/apps/binarly/values.yaml.gotmpl:
Configure Third-Party Charts
The Binarly Installation comes with a set of third-party charts, more information in considerations. These charts are configured in thecharts/{chart name} directory.