diff --git a/.github/workflows/build-consumerui.yaml b/.github/workflows/build-consumerui.yaml new file mode 100644 index 00000000..ecc4039a --- /dev/null +++ b/.github/workflows/build-consumerui.yaml @@ -0,0 +1,41 @@ +name: Build consumerui + +on: + push: + branches: + - "master" + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to Container Registry + uses: docker/login-action@v2 + with: + registry: ${{ secrets.REGISTRY }} + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + - + name: Set Version + run: echo "VERSION=$(tail -1 deploy/versions.txt)" >> $GITHUB_ENV + + - + name: Build and push consumerui + uses: docker/build-push-action@v4 + with: + context: . + file: consumerui/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ${{ secrets.REGISTRY }}/${{ secrets.REGISTRY_USERNAME }}/consumerui:latest \ No newline at end of file diff --git a/.github/workflows/build-deploy.yaml b/.github/workflows/build-deploy.yaml new file mode 100644 index 00000000..f87df00e --- /dev/null +++ b/.github/workflows/build-deploy.yaml @@ -0,0 +1,60 @@ +name: Build deploy utils + +on: + push: + branches: + - "master" + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to Container Registry + uses: docker/login-action@v2 + with: + registry: ${{ secrets.REGISTRY }} + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + - + name: Set Version + run: echo "VERSION=$(tail -1 deploy/versions.txt)" >> $GITHUB_ENV + - + name: Build and push webhook-tls-getter + uses: docker/build-push-action@v4 + with: + context: . + file: deploy/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ${{ secrets.REGISTRY }}/${{ secrets.REGISTRY_USERNAME }}/webhook-tls-getter:latest + - + name: Build and push delete-kubeplus-resources + uses: docker/build-push-action@v4 + with: + context: . + file: deploy/Dockerfile.cleanup + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ${{ secrets.REGISTRY }}/${{ secrets.REGISTRY_USERNAME }}/delete-kubeplus-resources:latest + - + name: Build and push kubeconfiggenerator + uses: docker/build-push-action@v4 + with: + context: . + file: deploy/Dockerfile.kubeconfiggenerator + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ${{ secrets.REGISTRY }}/${{ secrets.REGISTRY_USERNAME }}/kubeconfiggenerator:latest \ No newline at end of file diff --git a/.github/workflows/build-mutating-webhook-helper.yaml b/.github/workflows/build-mutating-webhook-helper.yaml new file mode 100644 index 00000000..971c20f6 --- /dev/null +++ b/.github/workflows/build-mutating-webhook-helper.yaml @@ -0,0 +1,40 @@ +name: Build mutating-webhook-helper + +on: + push: + branches: + - "master" + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to Container Registry + uses: docker/login-action@v2 + with: + registry: ${{ secrets.REGISTRY }} + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + - + name: Set Version + run: echo "VERSION=$(tail -1 deploy/versions.txt)" >> $GITHUB_ENV + - + name: Build and push mutating-webhook-helper + uses: docker/build-push-action@v4 + with: + context: . + file: mutating-webhook-helper/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ${{ secrets.REGISTRY }}/${{ secrets.REGISTRY_USERNAME }}/mutating-webhook-helper:latest \ No newline at end of file diff --git a/.github/workflows/build-mutating-webhook.yaml b/.github/workflows/build-mutating-webhook.yaml new file mode 100644 index 00000000..cb78fe70 --- /dev/null +++ b/.github/workflows/build-mutating-webhook.yaml @@ -0,0 +1,40 @@ +name: Build mutating-webhook + +on: + push: + branches: + - "master" + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to Container Registry + uses: docker/login-action@v2 + with: + registry: ${{ secrets.REGISTRY }} + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + - + name: Set Version + run: echo "VERSION=$(tail -1 deploy/versions.txt)" >> $GITHUB_ENV + - + name: Build and push mutating-webhook + uses: docker/build-push-action@v4 + with: + context: . + file: mutating-webhook/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ${{ secrets.REGISTRY }}/${{ secrets.REGISTRY_USERNAME }}/pac-mutating-admission-webhook:latest \ No newline at end of file diff --git a/.github/workflows/build-platform-operator.yaml b/.github/workflows/build-platform-operator.yaml new file mode 100644 index 00000000..57752171 --- /dev/null +++ b/.github/workflows/build-platform-operator.yaml @@ -0,0 +1,50 @@ +name: Build platform-operator and helmer + +on: + push: + branches: + - "master" + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to Container Registry + uses: docker/login-action@v2 + with: + registry: ${{ secrets.REGISTRY }} + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + - + name: Set Version + run: echo "VERSION=$(tail -1 deploy/versions.txt)" >> $GITHUB_ENV + - + name: Build and push platform-operator + uses: docker/build-push-action@v4 + with: + context: . + file: platform-operator/artifacts/deployment/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ${{ secrets.REGISTRY }}/${{ secrets.REGISTRY_USERNAME }}/platform-operator:latest + - + name: Build and push helm pod + uses: docker/build-push-action@v4 + with: + context: . + file: platform-operator/helm-pod/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ${{ secrets.REGISTRY }}/${{ secrets.REGISTRY_USERNAME }}/helm-pod:latest \ No newline at end of file diff --git a/consumerui/Dockerfile b/consumerui/Dockerfile index d83e32b8..3313f95b 100644 --- a/consumerui/Dockerfile +++ b/consumerui/Dockerfile @@ -6,11 +6,11 @@ RUN curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packa RUN wget https://github.com/cloud-ark/kubeplus/raw/master/kubeplus-kubectl-plugins.tar.gz && gunzip kubeplus-kubectl-plugins.tar.gz && tar -xvf kubeplus-kubectl-plugins.tar && cp -r /plugins/* bin/ -ADD requirements.txt /root/requirements.txt -ADD consumerui.py /root/consumerui.py -ADD grapher.py /root/grapher.py -ADD templates /root/templates -ADD static /root/static +ADD consumerui/requirements.txt /root/requirements.txt +ADD consumerui/consumerui.py /root/consumerui.py +ADD consumerui/grapher.py /root/grapher.py +ADD consumerui/templates /root/templates +ADD consumerui/static /root/static RUN cd /root; pip install -r requirements.txt RUN mkdir /root/.kube/ diff --git a/deploy/Dockerfile b/deploy/Dockerfile index 59dda1ad..78f57c34 100644 --- a/deploy/Dockerfile +++ b/deploy/Dockerfile @@ -1,10 +1,10 @@ FROM ubuntu:20.04 -RUN apt-get update && apt-get install -y openssl jq python3 python3-pip && pip3 install pyyaml -ADD webhook-create-self-signed-ca-cert.sh / -COPY kubectl /root/ -COPY kubeplus-non-pod-resources.yaml /root/. -COPY mutatingwebhook.yaml /root/. +RUN apt-get update && apt-get install -y openssl curl jq python3 python3-pip && pip3 install pyyaml +ADD deploy/webhook-create-self-signed-ca-cert.sh / +RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && cd /root/ && curl -LO "https://dl.k8s.io/release/v1.26.0/bin/linux/${arch}/kubectl" +COPY deploy/kubeplus-non-pod-resources.yaml /root/. +COPY deploy/mutatingwebhook.yaml /root/. #COPY webhook-patch-ca-bundle-new.sh /root/. -COPY kubeconfiggenerator.py /root/. +COPY deploy/kubeconfiggenerator.py /root/. RUN cp /root/kubectl bin/. && chmod +x /root/kubectl && chmod +x bin/kubectl ENTRYPOINT ["/webhook-create-self-signed-ca-cert.sh"] diff --git a/deploy/Dockerfile.cleanup b/deploy/Dockerfile.cleanup index 24bea511..4253538a 100644 --- a/deploy/Dockerfile.cleanup +++ b/deploy/Dockerfile.cleanup @@ -1,6 +1,6 @@ FROM ubuntu:20.04 -ADD delete-kubeplus-components.sh /root/. -COPY kubectl /root/ -RUN apt-get update && apt-get install -y openssl jq python3 python3-pip && pip3 install pyyaml +ADD deploy/delete-kubeplus-components.sh /root/. +RUN apt-get update && apt-get install -y openssl curl jq python3 python3-pip && pip3 install pyyaml +RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && cd /root/ && curl -LO "https://dl.k8s.io/release/v1.26.0/bin/linux/${arch}/kubectl" RUN cp /root/kubectl bin/. && chmod +x /root/kubectl && chmod +x bin/kubectl ENTRYPOINT ["/root/delete-kubeplus-components.sh"] diff --git a/deploy/Dockerfile.kubeconfiggenerator b/deploy/Dockerfile.kubeconfiggenerator index 255bb5db..197cb0cb 100644 --- a/deploy/Dockerfile.kubeconfiggenerator +++ b/deploy/Dockerfile.kubeconfiggenerator @@ -1,15 +1,19 @@ FROM ubuntu:20.04 -RUN apt-get update && apt-get install -y openssl jq python3 python3-pip wget && pip3 install pyyaml -COPY kubectl /root/ -COPY helm /root/ -COPY kubeconfiggenerator.py /root/. -COPY kubeconfiggenerator.sh /root/. -ADD requirements.txt /root/requirements.txt -RUN cd /root; pip install -r requirements.txt +RUN apt-get update && apt-get install -y curl wget openssl jq python3 python3-pip && pip3 install pyyaml Flask +RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \ + wget "https://get.helm.sh/helm-v3.11.1-linux-${arch}.tar.gz" && \ + tar xvf "helm-v3.11.1-linux-${arch}.tar.gz" && \ + mv "linux-${arch}/helm" /root/ && rm "helm-v3.11.1-linux-${arch}.tar.gz" && \ + rm -rf "linux-${arch}"/ +RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && cd /root/ && curl -LO "https://dl.k8s.io/release/v1.26.0/bin/linux/${arch}/kubectl" +COPY deploy/kubeconfiggenerator.sh /root/. +COPY deploy/kubeconfiggenerator.py /root/. RUN cp /root/kubectl bin/. && chmod +x /root/kubectl && chmod +x bin/kubectl && chmod +x /root/kubeconfiggenerator.sh && cp /root/helm bin/. && chmod +x /root/helm && chmod +x bin/helm #ENTRYPOINT ["/root/kubeconfiggenerator.sh"] +#ENTRYPOINT ["/root/kubeconfiggenerator.sh"] + EXPOSE 5005 CMD ["python3", "/root/kubeconfiggenerator.py"] diff --git a/deploy/kubeplus-chart/templates/_helpers.tpl b/deploy/kubeplus-chart/templates/_helpers.tpl new file mode 100644 index 00000000..db384124 --- /dev/null +++ b/deploy/kubeplus-chart/templates/_helpers.tpl @@ -0,0 +1,49 @@ +{{- define "webhooktlsGetterImage" -}} +{{- $registryName := .Values.webhooktlsGetter.image.registry -}} +{{- $imageName := .Values.webhooktlsGetter.image.repository -}} +{{- $tag := .Values.webhooktlsGetter.image.tag -}} +{{- printf "%s/%s:%s" $registryName $imageName $tag -}} +{{- end -}} + +{{- define "kubeconfiggeneratorImage" -}} +{{- $registryName := .Values.kubeconfiggenerator.image.registry -}} +{{- $imageName := .Values.kubeconfiggenerator.image.repository -}} +{{- $tag := .Values.kubeconfiggenerator.image.tag -}} +{{- printf "%s/%s:%s" $registryName $imageName $tag -}} +{{- end -}} + +{{- define "mutatingAdmissionWebhookImage" -}} +{{- $registryName := .Values.mutatingAdmissionWebhook.image.registry -}} +{{- $imageName := .Values.mutatingAdmissionWebhook.image.repository -}} +{{- $tag := .Values.mutatingAdmissionWebhook.image.tag -}} +{{- printf "%s/%s:%s" $registryName $imageName $tag -}} +{{- end -}} + +{{- define "platformOperatorImage" -}} +{{- $registryName := .Values.platformOperator.image.registry -}} +{{- $imageName := .Values.platformOperator.image.repository -}} +{{- $tag := .Values.platformOperator.image.tag -}} +{{- printf "%s/%s:%s" $registryName $imageName $tag -}} +{{- end -}} + + +{{- define "consumeruiImage" -}} +{{- $registryName := .Values.consumerui.image.registry -}} +{{- $imageName := .Values.consumerui.image.repository -}} +{{- $tag := .Values.consumerui.image.tag -}} +{{- printf "%s/%s:%s" $registryName $imageName $tag -}} +{{- end -}} + +{{- define "helmerImage" -}} +{{- $registryName := .Values.helmer.image.registry -}} +{{- $imageName := .Values.helmer.image.repository -}} +{{- $tag := .Values.helmer.image.tag -}} +{{- printf "%s/%s:%s" $registryName $imageName $tag -}} +{{- end -}} + +{{- define "cleanupKubeplusComponentsImage" -}} +{{- $registryName := .Values.cleanupKubeplusComponents.image.registry -}} +{{- $imageName := .Values.cleanupKubeplusComponents.image.repository -}} +{{- $tag := .Values.cleanupKubeplusComponents.image.tag -}} +{{- printf "%s/%s:%s" $registryName $imageName $tag -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/kubeplus-chart/templates/kubeplus-components-6.yaml b/deploy/kubeplus-chart/templates/kubeplus-components-6.yaml index b25ee2d3..838dc49d 100644 --- a/deploy/kubeplus-chart/templates/kubeplus-components-6.yaml +++ b/deploy/kubeplus-chart/templates/kubeplus-components-6.yaml @@ -300,8 +300,8 @@ spec: initContainers: #containers: - name: webhook-cert-setup - image: gcr.io/cloudark-kubeplus/webhook-tls-getter:3.0.0 - imagePullPolicy: IfNotPresent + image: {{ template "webhooktlsGetterImage" . }} + imagePullPolicy: {{ .Values.webhooktlsGetter.image.pullPolicy | quote }} env: - name: KUBEPLUS_NAMESPACE valueFrom: @@ -317,8 +317,8 @@ spec: - "webhook-tls-certificates" containers: - name: kubeconfiggenerator - image: gcr.io/cloudark-kubeplus/kubeconfiggenerator:3.0.11 - imagePullPolicy: IfNotPresent + image: {{ template "kubeconfiggeneratorImage" . }} + imagePullPolicy: {{ .Values.kubeconfiggenerator.image.pullPolicy | quote }} env: - name: KUBEPLUS_NAMESPACE valueFrom: @@ -329,8 +329,8 @@ spec: args: - "$(KUBEPLUS_NAMESPACE)" - name: crd-hook - image: gcr.io/cloudark-kubeplus/pac-mutating-admission-webhook:3.0.6 - imagePullPolicy: IfNotPresent + image: {{ template "mutatingAdmissionWebhookImage" . }} + imagePullPolicy: {{ .Values.mutatingAdmissionWebhook.image.pullPolicy | quote }} env: - name: CHECK_KYVERNO_POLICIES value: "{{ .Values.CHECK_KYVERNO_POLICIES }}" @@ -347,16 +347,21 @@ spec: - name: shared-data mountPath: /crdinstances - name: platform-operator - image: gcr.io/cloudark-kubeplus/platform-operator:3.0.3 - imagePullPolicy: IfNotPresent + image: {{ template "platformOperatorImage" . }} + imagePullPolicy: {{ .Values.platformOperator.image.pullPolicy | quote }} command: [ "/platform-operator"] - name: consumerui - image: gcr.io/cloudark-kubeplus/consumerui:0.0.6 - imagePullPolicy: IfNotPresent + image: {{ template "consumeruiImage" . }} + imagePullPolicy: {{ .Values.consumerui.image.pullPolicy | quote }} command: [ "python3", "/root/consumerui.py"] - name: helmer +<<<<<<< HEAD image: gcr.io/cloudark-kubeplus/helm-pod:3.0.10 imagePullPolicy: IfNotPresent +======= + image: {{ template "helmerImage" . }} + imagePullPolicy: {{ .Values.helmer.image.pullPolicy | quote }} +>>>>>>> abead1b (Add git actions to build multi arch images) command: ["/root/helm-pod"] volumeMounts: - mountPath: /chart @@ -400,9 +405,8 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: gcr.io/cloudark-kubeplus/delete-kubeplus-resources:3.0.0 - imagePullPolicy: IfNotPresent + image: {{ template "cleanupKubeplusComponentsImage" . }} + imagePullPolicy: {{ .Values.cleanupKubeplusComponents.image.pullPolicy | quote }} command: ["./root/delete-kubeplus-components.sh"] args: - "$(KUBEPLUS_NAMESPACE)" - diff --git a/deploy/kubeplus-chart/values.yaml b/deploy/kubeplus-chart/values.yaml index 991984b0..6bcba0af 100644 --- a/deploy/kubeplus-chart/values.yaml +++ b/deploy/kubeplus-chart/values.yaml @@ -1,2 +1,45 @@ CHECK_KYVERNO_POLICIES: NO +webhooktlsGetter: + image: + registry: gcr.io + repository: cloudark-kubeplus/webhook-tls-getter + tag: 3.0.0 + pullPolicy: IfNotPresent +kubeconfiggenerator: + image: + registry: gcr.io + repository: cloudark-kubeplus/kubeconfiggenerator + tag: 3.0.11 + pullPolicy: IfNotPresent +mutatingAdmissionWebhook: + image: + registry: gcr.io + repository: cloudark-kubeplus/pac-mutating-admission-webhook + tag: 3.0.6 + pullPolicy: IfNotPresent +platformOperator: + image: + registry: gcr.io + repository: cloudark-kubeplus/platform-operator + tag: 3.0.3 + pullPolicy: IfNotPresent +consumerui: + image: + registry: gcr.io + repository: cloudark-kubeplus/consumerui + tag: 0.0.6 + pullPolicy: IfNotPresent +helmer: + image: + registry: gcr.io + repository: cloudark-kubeplus/helm-pod + tag: 3.0.9 + pullPolicy: IfNotPresent + +cleanupKubeplusComponents: + image: + registry: gcr.io + repository: cloudark-kubeplus/delete-kubeplus-resources + tag: 3.0.0 + pullPolicy: IfNotPresent diff --git a/mutating-webhook-helper/Dockerfile b/mutating-webhook-helper/Dockerfile index ad46c526..03149d50 100644 --- a/mutating-webhook-helper/Dockerfile +++ b/mutating-webhook-helper/Dockerfile @@ -1,5 +1,10 @@ -FROM ubuntu:20.04 +FROM golang:1.20.1-bullseye as builder +RUN mkdir /build +ADD ./ /build/ +WORKDIR /build/mutating-webhook-helper +RUN GO111MODULE=on; export GOOS=linux; go build . -ADD mutating-webhook-helper /mutating-webhook-helper +FROM ubuntu:20.04 +COPY --from=builder /build/mutating-webhook-helper/mutating-webhook-helper mutating-webhook-helper ENTRYPOINT ["./mutating-webhook-helper"] diff --git a/mutating-webhook/Dockerfile b/mutating-webhook/Dockerfile index cd6ed355..49281283 100644 --- a/mutating-webhook/Dockerfile +++ b/mutating-webhook/Dockerfile @@ -1,5 +1,11 @@ #FROM alpine:latest +FROM golang:1.20.1-bullseye as builder +RUN mkdir /build +ADD ./ /build/ +WORKDIR /build/mutating-webhook +RUN GO111MODULE=on; CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o crd-hook + FROM ubuntu:20.04 -ADD crd-hook /crd-hook +COPY --from=builder /build/mutating-webhook/crd-hook crd-hook ENTRYPOINT ["./crd-hook"] diff --git a/platform-operator/artifacts/deployment/Dockerfile b/platform-operator/artifacts/deployment/Dockerfile index 9644b1b5..affa6999 100644 --- a/platform-operator/artifacts/deployment/Dockerfile +++ b/platform-operator/artifacts/deployment/Dockerfile @@ -1,3 +1,9 @@ +FROM golang:1.20.1-bullseye as builder +RUN mkdir /build +ADD ./ /build/ +WORKDIR /build/platform-operator +RUN eexport GOOS=linux; go build . + FROM fedora -ADD platform-operator / +COPY --from=builder /build/platform-operator/platform-operator / ENTRYPOINT ["/platform-operator"] diff --git a/platform-operator/helm-pod/Dockerfile b/platform-operator/helm-pod/Dockerfile index e6dd014d..673c25f3 100644 --- a/platform-operator/helm-pod/Dockerfile +++ b/platform-operator/helm-pod/Dockerfile @@ -1,8 +1,20 @@ +#FROM alpine:latest +FROM golang:1.20.1-bullseye as builder +RUN mkdir /build +ADD ./ /build/ +WORKDIR /build/platform-operator/helm-pod +RUN export GO111MODULE=on; export GOOS=linux; go mod vendor; go build . + FROM ubuntu:20.04 -COPY helm /root/ -COPY kubectl /root/ -COPY helm-pod /root/ +COPY --from=builder /build/platform-operator/helm-pod/helm-pod /root/ +RUN apt-get update && apt-get install wget curl vim python -y +RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \ + wget "https://get.helm.sh/helm-v3.11.1-linux-${arch}.tar.gz" && \ + tar xvf "helm-v3.11.1-linux-${arch}.tar.gz" && \ + mv "linux-${arch}/helm" /root/ && rm "helm-v3.11.1-linux-${arch}.tar.gz" && \ + rm -rf "linux-${arch}"/ +RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && cd /root/ && curl -LO "https://dl.k8s.io/release/v1.26.0/bin/linux/${arch}/kubectl" RUN apt-get update && apt-get install wget curl vim python -y && mkdir /.helm && mkdir -p /.helm/repository && mkdir /.helm/repository/cache && mkdir -p /.helm/cache/archive && mkdir -p /.helm/cache/plugins && chmod +x /root/helm && chmod +x /root/kubectl && wget https://github.com/cloud-ark/kubeplus/raw/master/kubeplus-kubectl-plugins.tar.gz && gunzip kubeplus-kubectl-plugins.tar.gz && tar -xvf kubeplus-kubectl-plugins.tar && cp -r /plugins/* bin/ && cp /root/helm bin/. && cp /root/kubectl bin/. -COPY repositories.yaml /.helm/repository/ -COPY cloudark-helm-charts-index.yaml /.helm/repository/cache/ +COPY platform-operator/helm-pod/repositories.yaml /.helm/repository/ +COPY platform-operator/helm-pod/cloudark-helm-charts-index.yaml /.helm/repository/cache/ ENTRYPOINT ["/root/helm-pod"] diff --git a/platform-operator/helm-pod/Dockerfile.waiter b/platform-operator/helm-pod/Dockerfile.waiter index 9a4b759a..e028c148 100644 --- a/platform-operator/helm-pod/Dockerfile.waiter +++ b/platform-operator/helm-pod/Dockerfile.waiter @@ -1,5 +1,5 @@ FROM ubuntu:20.04 -COPY kubectl /root/ +RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && cd /root/ && curl -LO "https://dl.k8s.io/release/v1.26.0/bin/linux/${arch}/kubectl" COPY waiter.sh /root/ RUN chmod +x /root/kubectl && chmod +x /root/waiter.sh ENTRYPOINT ["/root/waiter.sh"]