Merge ~cjwatson/launchpad:charm-scripts-private-keys into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 838d3463fc716c1b103b8491faad723b0f721d7a
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:charm-scripts-private-keys
Merge into: launchpad:master
Diff against target: 61 lines (+26/-0)
2 files modified
charm/launchpad-scripts/config.yaml (+17/-0)
charm/launchpad-scripts/templates/launchpad-scripts-secrets-lazr.conf.j2 (+9/-0)
Reviewer Review Type Date Requested Status
Guruprasad Approve
Review via email: mp+448005@code.launchpad.net

Commit message

charm/launchpad-scripts: Add private key config

Description of the change

These are needed for establishing communication with various stores.

To post a comment you must log in.
Revision history for this message
Guruprasad (lgp171188) wrote :

LGTM 👍

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charm/launchpad-scripts/config.yaml b/charm/launchpad-scripts/config.yaml
2index fd55150..9c0c752 100644
3--- a/charm/launchpad-scripts/config.yaml
4+++ b/charm/launchpad-scripts/config.yaml
5@@ -3,6 +3,11 @@ options:
6 type: boolean
7 description: Should the cron jobs and the celery services be active?
8 default: true
9+ charmhub_secrets_private_key:
10+ type: string
11+ description: >
12+ Base64-encoded NaCl private key for decrypting Charmhub upload tokens.
13+ default:
14 checkwatches_batch_query_threshold:
15 type: int
16 description: The batch query threshold for the checkwatches.
17@@ -43,6 +48,12 @@ options:
18 This option will work only when the 'mirror_prober_active' option
19 is true.
20 default: false
21+ oci_registry_credentials_private_key:
22+ type: string
23+ description: >
24+ Base64-encoded NaCl private key for decrypting OCI registry upload
25+ credentials.
26+ default:
27 process_inbound_email_host:
28 type: string
29 description: >-
30@@ -60,3 +71,9 @@ options:
31 description: >-
32 The username to connect to the `process_inbound_email_host` as.
33 default:
34+ snap_store_secrets_private_key:
35+ type: string
36+ description: >
37+ Base64-encoded NaCl private key for decrypting snap store upload
38+ tokens.
39+ default:
40diff --git a/charm/launchpad-scripts/templates/launchpad-scripts-secrets-lazr.conf.j2 b/charm/launchpad-scripts/templates/launchpad-scripts-secrets-lazr.conf.j2
41index 13db7f3..0f223dc 100644
42--- a/charm/launchpad-scripts/templates/launchpad-scripts-secrets-lazr.conf.j2
43+++ b/charm/launchpad-scripts/templates/launchpad-scripts-secrets-lazr.conf.j2
44@@ -10,8 +10,17 @@
45
46 {% from "macros.j2" import opt -%}
47
48+[charms]
49+{{- opt("charmhub_secrets_private_key", charmhub_secrets_private_key) }}
50+
51 [checkwatches.credentials]
52 {%- for key, value in checkwatches_credentials.items() %}
53 {{ key }}: {{ value }}
54 {% endfor %}
55
56+[oci]
57+{{- opt("registry_secrets_private_key", oci_registry_credentials_private_key) }}
58+
59+[snappy]
60+{{- opt("store_secrets_private_key", snap_store_secrets_private_key) }}
61+

Subscribers

People subscribed via source and target branches

to status/vote changes: