-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* script +x permissions, fix skaffold, doc fixes * change waiter to use debian slim * new pull image scripts * add presentations
- Loading branch information
1 parent
9fc0e44
commit 84d5986
Showing
8 changed files
with
125 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
FROM alpine:3.17.0 | ||
FROM debian:11-slim | ||
|
||
RUN apk --update add jq curl postgresql-client | ||
RUN apt-get update && apt-get install -y jq curl postgresql-client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
pushd "$SCRIPT_DIR/../" > /dev/null | ||
|
||
if [ $# -gt 0 ]; then | ||
# Grab the images required for building Nemesis | ||
IMAGES=$(skaffold render -m nemesis -m enrichment --digest-source=tag | grep 'image:' | sed 's/^[ \t]*image: //' | sed 's/"//g' | grep -v '^nemesis-' | sort -u) | ||
else | ||
# Grab the images from the helm chart - this will pull the images from our Docker image registry | ||
IMAGES=$(helm template helm/nemesis/ | grep 'image:' | sed 's/^[ \t]*image: //' | sed 's/"//g' | sort -u) | ||
fi | ||
|
||
# Pull each image | ||
for image in $IMAGES; do | ||
only_slashes="${image//[^\/]}" | ||
slash_count="${#only_slashes}" | ||
|
||
if ((slash_count == 0)); then | ||
# Format: Just single a library image name provided (e.g. debian) | ||
domain="docker.io" | ||
image="library/${image}" | ||
elif ((slash_count == 1)); then | ||
# Format: REPO/NAME (e.g. specterops/nemesis) | ||
domain="docker.io" | ||
image="${image}" | ||
elif ((slash_count == 2)); then | ||
# Format: DOMAIN.LOCAL/REPO/NAME (e.g., docker.io/specterops/nemesis) | ||
domain=$(echo -n $image | awk -F[/] '{print $1}') | ||
image=$(echo -n $image | sed "s/^${domain}\///") | ||
else | ||
echo "ERROR: too many slashes!" | ||
exit | ||
fi | ||
|
||
# Check if we need to add the tag | ||
if [[ ! "$image" =~ : ]]; then | ||
image="${image}:latest" | ||
fi | ||
|
||
k3s ctr image pull "${domain}/${image}" | ||
done | ||
|
||
popd > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters