Repository navigation
Commit db24ea9
fix: allow ambient KUBECONFIG in render mode (#4406)
### Proposed changes
Allow render mode to accept `kubeconfig` when it is only the ambient
`KUBECONFIG` value injected by the SDK.
This path is pretty normal in CI.
`google-github-actions/get-gke-credentials` exports `KUBECONFIG` out of
the box. Before this PR, render mode tripped on that and failed with
`"kubeconfig" arg is not compatible with "renderYamlToDirectory" arg`.
After this PR, that ambient path is allowed, while explicit `kubeconfig`
is still blocked. Added a regression test too.
Repro:
1. Set `KUBECONFIG` to a valid kubeconfig file.
2. Create a provider with `renderYamlToDirectory` and do not pass
`kubeconfig` yourself.
3. The SDK fills `kubeconfig` from `KUBECONFIG`, then `CheckConfig`
fails.
4. With this PR, render mode works as expected.
### Related issues (optional)
Fixes #4399
Related #3498
---------
Co-authored-by: guineveresaenger <guinevere@pulumi.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 0833fab commit db24ea9
2 files changed
Lines changed: 49 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
418 | | - | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
419 | 421 | | |
420 | 422 | | |
421 | 423 | | |
| |||
440 | 442 | | |
441 | 443 | | |
442 | 444 | | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
443 | 453 | | |
444 | 454 | | |
445 | 455 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
137 | 175 | | |
138 | 176 | | |
139 | 177 | | |
| |||
0 commit comments