fix: avoid exporting kubeconfig if not set#121
Conversation
|
CI is failing |
d18f08f to
06d05d9
Compare
|
Should be fixed. |
5872a33 to
f1bca11
Compare
|
I pushed another commit that is slightly out of scope but:
A command like this: Will now do what you'd expect. With it, you can render a lot of manifests without having to apply them all at once. Before, we were getting errors like: |
This will respect outer $KUBECONFIG by default, unless something is specified.
This fixes downstream builds that were failing with:
```
nix build .#kubenix
error (ignored): SQLite database '/home/yajo/.cache/nix/eval-cache-v6/e2c155d8289bbf5b9d7ff161ad125c5026e61dbadddaf55652c23ef99249c588.sqlite' is busy
error: Cannot build '/nix/store/askjbhnkiz6wwn17kk88xa2clgwc3ysi-kubenix.drv'.
Reason: builder failed with exit code 1.
Output paths:
/nix/store/8hlx23350igvj88f0ghi6j74iazym4p1-kubenix
Last 7 log lines:
>
> In /nix/store/8hlx23350igvj88f0ghi6j74iazym4p1-kubenix/bin/kubenix line 4:
> KUBECONFIG='$HOME/.kube/config'
> ^------------------^ SC2016 (info): Expressions don't expand in single quotes, use double quotes for that.
>
> For more information:
> https://www.shellcheck.net/wiki/SC2016 -- Expressions don't expand in singl...
For full logs, run:
nix log /nix/store/askjbhnkiz6wwn17kk88xa2clgwc3ysi-kubenix.drv
```
@moduon MT-1075
Turns out that kubenix was looping over its args, effectively disabling the possibility to pass extra flags to the underlying kubectl. Now it will let you customize the command, such as with `kubenix apply -l kubenix/project=someproject`, to let you render a lot of manifests but apply only a part of them. @moduon MT-1075
f1bca11 to
6422312
Compare
|
This should be ready to merge. Anything missing? Thanks! |
|
I see this is fixing a regression introduced by your earlier PR. However the behaviour is still subtly different than before, since previously it was possible to override the Can we please revert to old behaviour as I'd consider this a breaking change? Thanks! |
scratch that, I prefer the new behaviour since:
|
|
we should cut a 0.4 release in the near future |
This will respect outer $KUBECONFIG by default, unless something is specified.
This fixes downstream builds that were failing with: