Skip to content
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.

Provide a way to set env vars for selfmedicate.sh #46

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

olberger
Copy link
Contributor

@olberger olberger commented Oct 9, 2019

This aims at solving #44

Setting env var value for selfmedicate in the YAML config file so it can
be passed to the provisionner

First variable will be PRELOADED_IMAGES

I'm not completely sure this is the best way to do...

Another variable could be the k8s version in KUBERNETES_VERSION (edited).

Closes #44

Setting env var value for selfmedicate in the YAML config file so it can
be passed to the provisionner

First variable will be PRELOADED_IMAGES
@olberger olberger marked this pull request as ready for review October 9, 2019 09:22
Aligns download of kubectl on k8s with same K8SVERSION env variable than
for selfmedicate.sh
@olberger
Copy link
Contributor Author

olberger commented Nov 3, 2019

Added another variable for the k8version

@olberger
Copy link
Contributor Author

olberger commented Nov 3, 2019

Btw, this would help address #56

@smk4664
Copy link
Member

smk4664 commented Nov 22, 2019

This didn't work for me, but I am testing another option. Same principle, just loading the variables differently.

Update, this did work, I just didn't fix the self-medicate script to use the variable.

Copy link
Member

@Mierdin Mierdin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I'm not quite sure what this change is meant to solve. We're already reading in the antidote config file at the beginning of selfmedicate, so why don't we just delegate all of these options to that script?

# Download the latest version of kubectl
echo "Installing Kubectl"
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl &>/dev/null
if [[ $K8SVERSION = v* ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not quite sure of the purpose of this. Since K8SVERSION should have a default value, let's just install whatever version is indicated there.

To be clear, I am in favor of installing the version under K8SVERSION, so I like the inner change, just not sure of the outer conditional.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I aimed at being able to use the provisionning scripts outside the context of Vagrant, thus not necessarily having K8SVERSION set

@@ -11,3 +11,12 @@ vm_config:
memory: 8192
cores: 2
provider: virtualbox

# Providing a value for options supported by the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's clear from this comment when I should modify these values. I think the idea is that if you're both a) using Vagrant and b) wish to override the default values in selfmedicate.sh, you should uncomment this - but I'd like to see more clarity here if that's true. My over-arching comment about why this only applies to Vagrant still stands though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a way for setting selfmedicate config vars passed to Vagrant guest
3 participants