Commit 679774a
committed
Align Kubernetes postgreSQL recipe secret handling with Azure
The Kubernetes recipe returned `secrets: { password, connectionString }`, but
the postgreSqlDatabases type declares no `secrets` property, so neither value
was reachable from an application. The Azure recipe in
recipe-packs/azure/aks-recipepack.bicep maps only `host`, and deliberately does
not use the `outputs.secrets` mechanism it uses one entry away for redisCaches.
That distinction is intentional. PostgreSQL administrator credentials flow into
the recipe as user-supplied properties, so there is nothing to hand back; Redis
access keys are generated by the infrastructure and must flow out. Drop the
unreachable secrets output so both platforms agree, and document the reasoning.
Also emit `port` as a string to match `type: string` on the resource type, and
update test/app.bicep to show the supported pattern: the application authors its
own Radius.Security/secrets resource and binds it into the container with
valueFrom.secretKeyRef. A connection cannot carry the password (sensitive
properties redact to null and are skipped by the containers recipe), so this is
the only way to deliver it, and it keeps the value out of the pod spec and off
the container resource, where env values are stored unencrypted.
Signed-off-by: Will Smith <willdavsmith@gmail.com>1 parent 65d8ba8 commit 679774a
2 files changed
Lines changed: 46 additions & 8 deletions
Lines changed: 12 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
192 | 201 | | |
193 | 202 | | |
194 | 203 | | |
| |||
204 | 213 | | |
205 | 214 | | |
206 | 215 | | |
207 | | - | |
| 216 | + | |
| 217 | + | |
208 | 218 | | |
209 | 219 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | 220 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
17 | 35 | | |
18 | 36 | | |
19 | 37 | | |
| |||
34 | 52 | | |
35 | 53 | | |
36 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
37 | 69 | | |
38 | 70 | | |
39 | 71 | | |
| |||
0 commit comments