From f8bbda47ba54873926c0ab51ad449e36d026cc52 Mon Sep 17 00:00:00 2001 From: mabulgu Date: Wed, 22 Nov 2023 01:24:21 +0300 Subject: [PATCH] pass kubeconfig --- .github/workflows/deploy.yml | 9 ++------- Dockerfile | 5 +++-- pyproject.toml | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index aaec9a7..cb45ef6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -50,13 +50,6 @@ jobs: with: time: '180s' - - name: Retrieve the kubeconfig and decode it to a file - env: - KUBECONFIG: ${{ secrets.KUBECONFIG }} - run: | - mkdir ~/.kube - echo "$KUBECONFIG" > ~/.kube/config - - name: Bake and push image uses: docker/build-push-action@v1.1.0 with: @@ -68,6 +61,8 @@ jobs: path: . dockerfile: ./Dockerfile push: true + build-args: | + KUBECONFIG=${{ secrets.KUBECONFIG }} upload_build_data_artifact: runs-on: ubuntu-latest diff --git a/Dockerfile b/Dockerfile index 31eba05..8d4a252 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ +ARG KUBECONFIG="" FROM python:3.11.6-alpine USER root RUN adduser -D kfkuser -RUN pip install strimzi-kafka-cli==0.1.0a73 +RUN pip install strimzi-kafka-cli==0.1.0a74 USER kfkuser RUN mkdir ~/.kube -COPY ~/.kube/config /home/kfkuser/.kube/config +RUN echo "${KUBECONFIG}" > /home/kfkuser/.kube/config RUN kfk --version diff --git a/pyproject.toml b/pyproject.toml index 757a58d..6158b12 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "strimzi-kafka-cli" -version = "0.1.0-alpha73" +version = "0.1.0-alpha74" description = "Command Line Interface for Strimzi Kafka Operator" authors = [{ name = "Aykut Bulgu", email = "aykut@systemcraftsman.com" }] readme = "README.md"