Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(helm): add list of container images #549

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

tiagolobocastro
Copy link
Contributor

Adds a list of container images which are used by the chart. This list is contained in file: charts/images.txt

Sometimes the images can't be figured out using templates, and in such cases we need to manually add them.
charts/dependencies-images.txt is covering the this for the dependencies.

Adds a list of container images which are used by the chart.
This list is contained in file: charts/images.txt

Sometimes the images can't be figured out using templates, and in such
cases we need to manually add them.
charts/dependencies-images.txt is covering the this for the dependencies.

Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
$HELM dependency update
fi

$HELM template . --set "$ENABLE_ANALYTICS" | grep "image:" | awk '{ print $2 }' | tr -d \" > "$IMAGES"
Copy link
Member

Choose a reason for hiding this comment

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

Enable analytics is not needed, the analytics code is embedded in the csi-controller image. But anyway since this is helm template should be fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's safer to enable all many options as we can, maybe tomorrow that can change, who knows.
Also we can enable jaeger here, just for completeness, though it's again tricky because it's operator based :(

Comment on lines +64 to +68
if [ "$DEP_UPDATE" = "true" ]; then
$HELM dependency update
fi

$HELM template . --set "$ENABLE_ANALYTICS" | grep "image:" | awk '{ print $2 }' | tr -d \" > "$IMAGES"
Copy link
Member

Choose a reason for hiding this comment

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

nit: --dependency-update does the same thing

Suggested change
if [ "$DEP_UPDATE" = "true" ]; then
$HELM dependency update
fi
$HELM template . --set "$ENABLE_ANALYTICS" | grep "image:" | awk '{ print $2 }' | tr -d \" > "$IMAGES"
dependency_update_opt=
if [ "$DEP_UPDATE" = "true" ]; then
dependency_update_opt="--dependency-update"
fi
$HELM template . --set "$ENABLE_ANALYTICS" "$dependency_update_opt" | grep "image:" | awk '{ print $2 }' | tr -d \" > "$IMAGES"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It requires more changes :)
Other than that, any advantage?

Comment on lines +15 to +23
echo_stderr() {
echo -e "${1}" >&2
}

die() {
local _return="${2:-1}"
echo_stderr "$1"
exit "${_return}"
}
Copy link
Member

Choose a reason for hiding this comment

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

There's /scripts/utils/log.sh you could source and use log_fatal or log_error.

local image="$1"
local file="$2"

grep -q "^$image$" "$file" || grep -q "^${image##docker.io/}$" "$file"
Copy link
Member

Choose a reason for hiding this comment

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

The Hostpath LocalPV images don't start with "docker.io".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, are you suggesting any changes here?

Copy link
Member

Choose a reason for hiding this comment

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

Right, sometimes the registry might not be specified, do we handle those cases?

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'm confused.. it's handled in line 29, what's the problem?


curr_images=$($DOCKER exec $worker crictl image | tail -n+2 | awk '{ print $1 ":" $2 }')
for image in ${curr_images[@]}; do
if grep_image "$image" "$worker/$KIND_IMAGES"; then
Copy link
Member

Choose a reason for hiding this comment

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

Does this also list the pause image?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably yes

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

Successfully merging this pull request may close these issues.

3 participants