Closed cdrage closed 8 years ago
This commit also adds 'kubectl set-config' commands in order to get the k8s tests working on centos-ci ping @dustymabe
Hey @surajssd @containscafeine @dustymabe @kadel
Can any of you please review / check this is okay for merge for the Atomic App tests?
Timeout... pinging again! @surajssd @containscafeine @dustymabe @kadel
Sorry, I saw this earlier, but forget to comment it :(
LGTM
Maybe one thing: Is this necessary kubectl config set-credentials default --token=foobar
?
From your commit message:
If 'sudo atomic run foo' is ran, it detects the user. However, because this script is being ran as root/sudo, the .kube/config file is located at /root/.kube/config and thus SUDO_USER and USER env variables need to be explicitly implied.
I would argue that this is a bug in atomicapp - we should detect where the user's home is and not hard code /home/ probably.
I will agree with @dustymabe , I think this is me being lazy in regards to the testing scenarios. We should be testing against having no .kube/config anyways as that's how it is by default on most beginner installations. Closing this PR.
This commit adds environment variables to the Makefile in order to explicit determine that the user that is running the file is indeed root.
The reasoning behind is that atomicapp now detects what user 'sudo' is running on.
If 'sudo atomic run foo' is ran, it detects the user. However, because this script is being ran as root/sudo, the .kube/config file is located at /root/.kube/config and thus SUDO_USER and USER env variables need to be explicitly implied.
Within the providers/kubernetes.sh file, kubectl config commands are added in order to generate the .kube/config file.