Commit dcd9b81
committed
Simplify the passing of KUBECONFIG
According to `man podman run` if we simply pass `-e KUBECONFIG` to
the podman invocation: "If an environment variable is spec‐
ified without a value, Podman checks the host environment for a value
and set the variable only if it is set on the host"
So let's just do that and drop the current more complex fragile logic.
Tested with:
* No KUBECONFIG set
unset KUBECONFIG; ./pattern.sh make install
make -f common/Makefile operator-deploy
make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
Checking prerequisites:
Check for 'git helm oc ansible': OK
Check for python-kubernetes: OK
Check for kubernetes.core collection: OK
Checking repository:
https://github.com/mbaldessari/multicloud-gitops.git - branch script-fix: Running inside a container: Skipping git ssh checks
Running helm:
Error: Kubernetes cluster unreachable: Get "https://localhos:6443/version"
* With KUBECONFIG set
export KUBECONFIG=~/sno1-kubeconfig
./pattern.sh make install
make -f common/Makefile operator-deploy
make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
Checking prerequisites:
Check for 'git helm oc ansible': OK
Check for python-kubernetes: OK
Check for kubernetes.core collection: OK
Checking repository:
https://github.com/mbaldessari/multicloud-gitops.git - branch script-fix: Running inside a container: Skipping git ssh checks
Running helm:
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/michele/sno1-kubeconfig
Release "multicloud-gitops" does not exist. Installing it now.
NAME: multicloud-gitops
LAST DEPLOYED: Mon Sep 4 07:04:16 2023
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
make[1]: Leaving directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
make load-secrets
make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
make -f common/Makefile load-secrets
...1 parent 344d037 commit dcd9b81
1 file changed
Lines changed: 1 addition & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 28 | | |
36 | 29 | | |
37 | 30 | | |
38 | 31 | | |
39 | 32 | | |
40 | | - | |
| 33 | + | |
41 | 34 | | |
42 | 35 | | |
43 | 36 | | |
| |||
0 commit comments