Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
echo "azure_cli=$(grep azure_cli versions | cut -d= -f2)" | tee -a $GITHUB_OUTPUT
echo "scalr_cli=$(grep scalr_cli versions | cut -d= -f2)" | tee -a $GITHUB_OUTPUT
echo "python=$(grep python versions | cut -d= -f2)" | tee -a $GITHUB_OUTPUT
echo "azure_kubelogin=$(grep azure_kubelogin versions | cut -d= -f2)" | tee -a $GITHUB_OUTPUT

- name: Build Docker image
uses: docker/build-push-action@v6
Expand All @@ -49,6 +50,7 @@ jobs:
AZURE_CLI_VERSION=${{ steps.versions.outputs.azure_cli }}
SCALR_CLI_VERSION=${{ steps.versions.outputs.scalr_cli }}
PYTHON_VERSION=${{ steps.versions.outputs.python }}
AZURE_KUBELOGIN_VERSION=${{ steps.versions.outputs.azure_kubelogin }}
cache-from: type=registry,ref=scalr/runner:buildcache
cache-to: type=registry,ref=scalr/runner:buildcache
load: true
Expand All @@ -65,3 +67,4 @@ jobs:
docker run --rm scalr/runner:sha-${{ github.sha }} -xc 'python --version'
docker run --rm scalr/runner:sha-${{ github.sha }} -xc 'pip --version'
docker run --rm scalr/runner:sha-${{ github.sha }} -xc 'pip install requests'
docker run --rm scalr/runner:sha-${{ github.sha }} -xc 'kubelogin --version'
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
echo "azure_cli=$(grep azure_cli versions | cut -d= -f2)" | tee -a $GITHUB_OUTPUT
echo "scalr_cli=$(grep scalr_cli versions | cut -d= -f2)" | tee -a $GITHUB_OUTPUT
echo "python=$(grep python versions | cut -d= -f2)" | tee -a $GITHUB_OUTPUT
echo "azure_kubelogin=$(grep azure_kubelogin versions | cut -d= -f2)" | tee -a $GITHUB_OUTPUT

- name: Format Image Tag
id: image_tag
Expand All @@ -51,6 +52,7 @@ jobs:
AZURE_CLI_VERSION=${{ steps.versions.outputs.azure_cli }}
SCALR_CLI_VERSION=${{ steps.versions.outputs.scalr_cli }}
PYTHON_VERSION=${{ steps.versions.outputs.python }}
AZURE_KUBELOGIN_VERSION=${{ steps.versions.outputs.azure_kubelogin }}
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=scalr/runner:buildcache
cache-to: type=registry,ref=scalr/runner:buildcache
Expand Down
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,17 @@ RUN <<EOT
rm -rf scalr_cli.zip
EOT

# Azure Kubelogin
ARG AZURE_KUBELOGIN_VERSION
LABEL azure-kubelogin.version=${AZURE_KUBELOGIN_VERSION}
RUN <<EOT
curl -fsSL "https://github.com/Azure/kubelogin/releases/download/${AZURE_KUBELOGIN_VERSION}/kubelogin-linux-${TARGETARCH}.zip" -o /tmp/kubelogin.zip
unzip -p /tmp/kubelogin.zip "bin/linux_${TARGETARCH}/kubelogin" > /usr/local/bin/kubelogin
chmod a+x /usr/local/bin/kubelogin
# Cleanup
rm -f /tmp/kubelogin.zip
EOT

# Add the scalr user (optional; used when running the container with UID 1000).
RUN useradd -u 1000 -m scalr

Expand Down
1 change: 1 addition & 0 deletions versions
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ aws_cli=2.27.32
azure_cli=2.74.0
scalr_cli=0.17.1
python=3.13.3
azure_kubelogin=v0.2.13