This commit is contained in:
2024-02-20 17:15:27 +08:00
committed by huty
parent 6706e1a633
commit 34158042ad
1529 changed files with 177765 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
#using node to match base image for serverless cli
FROM node:12
ENV KUBELESS_VERSION="v1.0.7" \
KUBERNETES_VERSION="1.18.5"
RUN curl -LO https://github.com/kubeless/kubeless/releases/download/${KUBELESS_VERSION}/kubeless_linux-amd64.zip && \
unzip kubeless_linux-amd64.zip && \
rm -f kubeless_linux-amd64.zip && \
chmod +x bundles/kubeless_linux-amd64/kubeless && \
mv bundles/kubeless_linux-amd64/kubeless /usr/local/bin/
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v${KUBERNETES_VERSION}/bin/linux/amd64/kubectl && \
chmod +x kubectl && \
mv kubectl /usr/local/bin/
COPY start.sh /
RUN chmod +x /start.sh
CMD /start.sh
WORKDIR /kiamol

View File

@@ -0,0 +1,13 @@
#!/bin/sh
# set up access to Kube API
kubectl config set-cluster default --server=https://kubernetes.default.svc.cluster.local --certificate-authority=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
kubectl config set-context default --cluster=default
kubectl config set-credentials user --token=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
kubectl config set-context default --user=user
kubectl config use-context default
cd /
git clone https://github.com/sixeyed/kiamol
while true; do sleep 1000; done