Skip to content

Commit

Permalink
TESTING
Browse files Browse the repository at this point in the history
  • Loading branch information
chiukapoor committed Oct 30, 2024
1 parent 7789221 commit 86b6b6b
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 33 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,24 @@ jobs:
export PATH=$KUBEPLUS_HOME/plugins:$PATH
echo "PATH=$PATH" >> $GITHUB_ENV
- name: Build Mutating Webhook
run: |
echo "KUBEPLUS_HOME:$KUBEPLUS_HOME"
cd $KUBEPLUS_HOME/mutating-webhook
export GO111MODULE=on
go get github.com/googleapis/[email protected]
./build-artifact.sh latest
- name: Build Helmer
run: |
cd $KUBEPLUS_HOME/platform-operator/helm-pod/
go mod vendor
./build-artifact.sh latest
- name: Build Platform Operator
run: |
cd $KUBEPLUS_HOME/platform-operator
./build-artifact.sh latest
# - name: Build Mutating Webhook
# run: |
# echo "KUBEPLUS_HOME:$KUBEPLUS_HOME"
# cd $KUBEPLUS_HOME/mutating-webhook
# export GO111MODULE=on
# go get github.com/googleapis/[email protected]
# ./build-artifact.sh latest

# - name: Build Helmer
# run: |
# cd $KUBEPLUS_HOME/platform-operator/helm-pod/
# go mod vendor
# ./build-artifact.sh latest

# - name: Build Platform Operator
# run: |
# cd $KUBEPLUS_HOME/platform-operator
# ./build-artifact.sh latest

- name: Build KubeConfig Generator
run: |
Expand Down
43 changes: 28 additions & 15 deletions deploy/Dockerfile.kubeconfiggenerator
Original file line number Diff line number Diff line change
@@ -1,25 +1,38 @@
FROM ubuntu:20.04

USER root
RUN apt-get update && apt-get upgrade && apt-get install -y curl openssl jq python3 python3-pip wget ca-certificates && pip3 install pyyaml
#COPY kubectl /root/

# Update, install dependencies, and clean up apt cache
RUN apt-get update && apt-get upgrade -y

RUN apt-get install -y --no-install-recommends curl openssl jq python3 python3-pip wget ca-certificates

RUN rm -rf /var/lib/apt/lists/*

RUN pip3 install pyyaml

# Copy files to the image
COPY kubeconfiggenerator.py /root/.
COPY kubeconfiggenerator.sh /root/.
ADD requirements.txt /root/requirements.txt
RUN cd /root; pip3 install -r requirements.txt
#RUN cp /root/kubectl bin/. && chmod +x /root/kubectl && chmod +x bin/kubectl &&
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
RUN install -o root -g root -m 0755 kubectl bin/kubectl
RUN cp bin/kubectl /root/kubectl
RUN chmod +x /root/kubectl && chmod +x bin/kubectl
RUN chmod +x /root/kubeconfiggenerator.sh
RUN wget https://get.helm.sh/helm-v3.12.1-linux-amd64.tar.gz \
&& gunzip helm-v3.12.1-linux-amd64.tar.gz \
&& tar -xvf helm-v3.12.1-linux-amd64.tar \
&& mv linux-amd64/helm bin/.

# Install Python dependencies
RUN cd /root && pip3 install -r requirements.txt

# Install kubectl and clean up
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \
rm kubectl

#ENTRYPOINT ["/root/kubeconfiggenerator.sh"]
# Set executable permissions for scripts
RUN chmod +x /root/kubeconfiggenerator.sh /root/kubeconfiggenerator.py

# Install Helm, clean up tar files
RUN wget https://get.helm.sh/helm-v3.12.1-linux-amd64.tar.gz && \
tar -xzf helm-v3.12.1-linux-amd64.tar.gz && \
mv linux-amd64/helm /usr/local/bin/helm && \
rm -rf helm-v3.12.1-linux-amd64.tar.gz linux-amd64

# Set default command to run the Python script
EXPOSE 5005
CMD ["python3", "/root/kubeconfiggenerator.py"]

1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ if $INSTALL_KUBEPLUS; then
exit 1
fi
echo "Waiting for KubePlus to start.."
kubectl get pods --namespace $KUBEPLUS_NAMESPACE
sleep 1
elapsed=$((elapsed + 1))
done
Expand Down

0 comments on commit 86b6b6b

Please sign in to comment.