Skip to content

Commit f2ee48b

Browse files
authored
feat(chart): Replace Vault dependency to use Bitnami chart (#935)
Signed-off-by: Javier Rodriguez <[email protected]>
1 parent 17a0c34 commit f2ee48b

24 files changed

+153
-30
lines changed

deployment/chainloop/Chart.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
dependencies:
22
- name: common
33
repository: https://charts.bitnami.com/bitnami
4-
version: 2.13.3
4+
version: 2.20.2
55
- name: postgresql
66
repository: https://charts.bitnami.com/bitnami
77
version: 12.12.10
88
- name: vault
9-
repository: https://helm.releases.hashicorp.com
10-
version: 0.24.1
11-
digest: sha256:1b95f8a9f568f84ea7311e984c3a4c85270254dd33b42c9f6e9f606dc3f525e2
12-
generated: "2023-10-19T09:44:57.183038226+02:00"
9+
repository: https://charts.bitnami.com/bitnami
10+
version: 1.4.5
11+
digest: sha256:f36d00d6d657f2e9f7f1dc6df78e852471cff214b8a7a8ad9722351b978aefdf
12+
generated: "2024-06-10T14:18:12.118269+02:00"

deployment/chainloop/Chart.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
# Copyright Chainloop, Inc. All Rights Reserved.
2+
# SPDX-License-Identifier: APACHE-2.0
3+
14
apiVersion: v2
25
name: chainloop
36
description: Chainloop is an open source software supply chain control plane, a single source of truth for artifacts plus a declarative attestation crafting process.
47

58
type: application
69
# Bump the patch (not minor, not major) version on each change in the Chart Source code
7-
version: 1.56.0
10+
version: 1.56.1
811
# Do not update appVersion, this is handled automatically by the release process
912
appVersion: v0.91.1
1013

@@ -20,5 +23,5 @@ dependencies:
2023
version: 12.x.x
2124
- condition: development
2225
name: vault
23-
repository: https://helm.releases.hashicorp.com
24-
version: 0.24.x
26+
repository: https://charts.bitnami.com/bitnami
27+
version: 1.4.x

deployment/chainloop/README.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,11 @@ chainloop config save \
561561
| `controlplane.sentry.enabled` | Enable sentry.io alerting | `false` |
562562
| `controlplane.sentry.dsn` | DSN endpoint https://docs.sentry.io/product/sentry-basics/dsn-explainer/ | `""` |
563563
| `controlplane.sentry.environment` | Environment tag | `production` |
564+
| `controlplane.keylessSigning.enabled` | Activates or deactivates de feature | `false` |
565+
| `controlplane.keylessSigning.backend` | The backend to use. Currently only "fileCA" is supported | `fileCA` |
566+
| `controlplane.keylessSigning.fileCA.cert` | The PEM-encoded certificate of the file based CA | `""` |
567+
| `controlplane.keylessSigning.fileCA.key` | The PEM-encoded private key of the file based CA | `""` |
568+
| `controlplane.keylessSigning.fileCA.keyPass` | The secret key pass | `""` |
564569
565570
### Artifact Content Addressable (CAS) API
566571
@@ -630,16 +635,20 @@ chainloop config save \
630635
631636
### Dependencies
632637
633-
| Name | Description | Value |
634-
| ------------------------------------ | ------------------------------------------------------------------------------------------------------ | -------------- |
635-
| `postgresql.enabled` | Switch to enable or disable the PostgreSQL helm chart | `true` |
636-
| `postgresql.auth.enablePostgresUser` | Assign a password to the "postgres" admin user. Otherwise, remote access will be blocked for this user | `false` |
637-
| `postgresql.auth.username` | Name for a custom user to create | `chainloop` |
638-
| `postgresql.auth.password` | Password for the custom user to create | `chainlooppwd` |
639-
| `postgresql.auth.database` | Name for a custom database to create | `chainloop-cp` |
640-
| `postgresql.auth.existingSecret` | Name of existing secret to use for PostgreSQL credentials | `""` |
641-
| `vault.server.dev.enabled` | Enable development mode (unsealed, in-memory, insecure) | `true` |
642-
| `vault.server.dev.devRootToken` | Connection token | `notapassword` |
638+
| Name | Description | Value |
639+
| ------------------------------------ | ------------------------------------------------------------------------------------------------------ |----------------------------------------------------------------------------------------------------------------------------|
640+
| `postgresql.enabled` | Switch to enable or disable the PostgreSQL helm chart | `true` |
641+
| `postgresql.auth.enablePostgresUser` | Assign a password to the "postgres" admin user. Otherwise, remote access will be blocked for this user | `false` |
642+
| `postgresql.auth.username` | Name for a custom user to create | `chainloop` |
643+
| `postgresql.auth.password` | Password for the custom user to create | `chainlooppwd` |
644+
| `postgresql.auth.database` | Name for a custom database to create | `chainloop-cp` |
645+
| `postgresql.auth.existingSecret` | Name of existing secret to use for PostgreSQL credentials | `""` |
646+
| `vault.server.args` | Arguments to pass to the vault server. This is useful for setting the server in development mode | `["server","-dev"]` |
647+
| `vault.server.config` | Configuration for the vault server. Small override of default Bitnami configuration | <pre><code>storage "inmem" {}<br/>disable_mlock = true<br/>ui = true<br/>service_registration "kubernetes" {}</code></pre> |
648+
| `vault.server.extraEnvVars[0].name` | Root token for the vault server | `VAULT_DEV_ROOT_TOKEN_ID` |
649+
| `vault.server.extraEnvVars[0].value` | The value of the root token. Default: notasecret | `notasecret` |
650+
| `vault.server.extraEnvVars[1].name` | Address to listen on development mode | `VAULT_DEV_LISTEN_ADDRESS` |
651+
| `vault.server.extraEnvVars[1].value` | The address to listen on. Default: [::]:8200 | `[::]:8200` |
643652
644653
## License
645654
-13.5 KB
Binary file not shown.
15.7 KB
Binary file not shown.
-44.2 KB
Binary file not shown.
55.7 KB
Binary file not shown.

deployment/chainloop/templates/_helpers.tpl

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
{{- /*
2+
Copyright Chainloop, Inc. All Rights Reserved.
3+
SPDX-License-Identifier: APACHE-2.0
4+
*/}}
15

26
{{- define "chainloop.postgresql.fullname" -}}
37
{{- include "common.names.dependency.fullname" (dict "chartName" "postgresql" "chartValues" .Values.postgresql "context" $) -}}
@@ -61,14 +65,24 @@ WBiBSPaJtz6JYk/fye4=
6165
{{- with .Values.secretsBackend }}
6266
secretPrefix: {{ required "secret prefix required" .secretPrefix | quote }}
6367
{{- if eq .backend "vault" }}
68+
{{- $tokenEnvVar := "" }}
69+
{{- range $.Values.vault.server.extraEnvVars }}
70+
{{- if eq .name "VAULT_DEV_ROOT_TOKEN_ID" }}
71+
{{- $tokenEnvVar = .value }}
72+
{{- end }}
73+
{{- end }}
6474
vault:
6575
{{- if and $.Values.development (or (not .vault) not .vault.address) }}
66-
address: {{ printf "http://%s:8200" (include "chainloop.vault.fullname" $) | quote }}
67-
token: {{ $.Values.vault.server.dev.devRootToken | quote }}
68-
{{- else if (required "vault backend selected but configuration not provided" .vault ) }}
76+
address: {{ printf "http://%s-server:8200" (include "chainloop.vault.fullname" $) | quote }}
77+
{{- if $tokenEnvVar }}
78+
token: {{ $tokenEnvVar | quote }}
79+
{{- else }}
80+
{{- required "VAULT_DEV_ROOT_TOKEN_ID environment variable is required when development mode is enabled" (index $.Values.vault.server.extraEnvVars "VAULT_DEV_ROOT_TOKEN_ID") }}
81+
{{- end }}
82+
{{- else if (required "vault backend selected but configuration not provided" .vault ) }}
6983
address: {{ required "vault address required" .vault.address | quote }}
7084
token: {{ required "vault token required" .vault.token | quote }}
71-
{{- end }}
85+
{{- end }}
7286

7387
{{- else if eq .backend "awsSecretManager" }}
7488
awsSecretManager:

deployment/chainloop/templates/controlplane/config.configmap.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
{{- /*
2+
Copyright Chainloop, Inc. All Rights Reserved.
3+
SPDX-License-Identifier: APACHE-2.0
4+
*/}}
5+
16
apiVersion: v1
27
kind: ConfigMap
38
metadata:

deployment/chainloop/templates/controlplane/config.secret.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
{{- /*
2+
Copyright Chainloop, Inc. All Rights Reserved.
3+
SPDX-License-Identifier: APACHE-2.0
4+
*/}}
5+
16
apiVersion: v1
27
kind: Secret
38
metadata:

0 commit comments

Comments
 (0)