Skip to content

Commit

Permalink
Merge pull request alpine-docker#67 from LeoDiazL/add-vals-tool
Browse files Browse the repository at this point in the history
Add vals tool to image
  • Loading branch information
ozbillwang authored Oct 29, 2023
2 parents e6aafc2 + be2120a commit 0e04243
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ARG KUBECTL_VERSION=1.17.5
ARG KUSTOMIZE_VERSION=v3.8.1
ARG KUBESEAL_VERSION=0.18.1
ARG KREW_VERSION=v0.4.4
ARG VALS_VERSION=0.28.1

# Install helm (latest release)
# ENV BASE_URL="https://storage.googleapis.com/kubernetes-helm"
Expand Down Expand Up @@ -87,6 +88,11 @@ RUN . /envfile && echo $ARCH && \
curl -L https://github.com/bitnami-labs/sealed-secrets/releases/download/v${KUBESEAL_VERSION}/kubeseal-${KUBESEAL_VERSION}-linux-${ARCH}.tar.gz -o - | tar xz -C /usr/bin/ && \
chmod +x /usr/bin/kubeseal

# Install vals
RUN . /envfile && echo $ARCH && \
curl -L https://github.com/helmfile/vals/releases/download/v${VALS_VERSION}/vals_${VALS_VERSION}_linux_${ARCH}.tar.gz -o -| tar xz -C /usr/bin/ && \
chmod +x /usr/bin/vals

# Install krew (latest release)
RUN . /envfile && echo $ARCH && \
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/download/v${KREW_VERSION}/krew-linux_${ARCH}.tar.gz" && \
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ kubernetes docker images with necessary tools
- [awscli v1](https://github.com/aws/aws-cli) (latest version when run the build)
- [kubeseal](https://github.com/bitnami-labs/sealed-secrets) (latest version when run the build)
- [krew](https://github.com/kubernetes-sigs/krew) (latest version when run the build)
- [vals](https://github.com/helmfile/vals) (latest version when run the build)
- General tools, such as bash, curl, jq, yq, etc

### Github Repo
Expand Down
9 changes: 8 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,23 @@ build() {
| sort -rV | head -n 1 |sed 's/v//')
echo "kubeseal version is $kubeseal_version"

# kubeseal latest
# krew latest
krew_version=$(curl -s https://api.github.com/repos/kubernetes-sigs/krew/releases | jq -r '.[].tag_name | select(startswith("v"))' \
| sort -rV | head -n 1 |sed 's/v//')
echo "krew version is $krew_version"

# vals latest
vals_version=$(curl -s https://api.github.com/repos/helmfile/vals/releases | jq -r '.[].tag_name | select(startswith("v"))' \
| sort -rV | head -n 1 |sed 's/v//')
echo "vals version is $vals_version"

docker build --no-cache \
--build-arg KUBECTL_VERSION=${tag} \
--build-arg HELM_VERSION=${helm} \
--build-arg KUSTOMIZE_VERSION=${kustomize_version} \
--build-arg KUBESEAL_VERSION=${kubeseal_version} \
--build-arg KREW_VERSION=${krew_version} \
--build-arg VALS_VERSION=${vals_version} \
-t ${image}:${tag} .

# run test
Expand All @@ -71,6 +77,7 @@ build() {
--build-arg KUSTOMIZE_VERSION=${kustomize_version} \
--build-arg KUBESEAL_VERSION=${kubeseal_version} \
--build-arg KREW_VERSION=${krew_version} \
--build-arg VALS_VERSION=${vals_version} \
-t ${image}:${tag} .
fi
}
Expand Down

0 comments on commit 0e04243

Please sign in to comment.