diff --git a/.github/workflows/registry.yml b/.github/workflows/registry.yml index e3f382a67..036e195f0 100644 --- a/.github/workflows/registry.yml +++ b/.github/workflows/registry.yml @@ -167,25 +167,6 @@ jobs: docker.io/oamdev/vela-rollout:${{ steps.get_version.outputs.VERSION }} ghcr.io/${{ github.repository_owner }}/oamdev/vela-rollout:${{ steps.get_version.outputs.VERSION }} ${{ secrets.ACR_DOMAIN }}/oamdev/vela-rollout:${{ steps.get_version.outputs.VERSION }} - - - uses: docker/build-push-action@v2 - name: Build & Pushing CloudShell for Dockerhub, GHCR and ACR - with: - context: . - file: Dockerfile.cloudshell - labels: |- - org.opencontainers.image.source=https://github.com/${{ github.repository }} - org.opencontainers.image.revision=${{ github.sha }} - platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} - build-args: | - GITVERSION=git-${{ steps.vars.outputs.git_revision }} - VERSION=${{ steps.get_version.outputs.VERSION }} - GOPROXY=https://proxy.golang.org - tags: |- - docker.io/oamdev/cloudshell:${{ steps.get_version.outputs.VERSION }} - ghcr.io/${{ github.repository_owner }}/oamdev/cloudshell:${{ steps.get_version.outputs.VERSION }} - ${{ secrets.ACR_DOMAIN }}/oamdev/cloudshell:${{ steps.get_version.outputs.VERSION }} publish-capabilities: env: diff --git a/Dockerfile.cloudshell b/Dockerfile.cloudshell deleted file mode 100644 index e0c403144..000000000 --- a/Dockerfile.cloudshell +++ /dev/null @@ -1,31 +0,0 @@ -ARG BASE_IMAGE -# Build the cli binary -FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.17-alpine as builder -ARG GOPROXY -ENV GOPROXY=${GOPROXY:-https://goproxy.cn} -WORKDIR /workspace -# Copy the Go Modules manifests -COPY go.mod go.mod -COPY go.sum go.sum -# cache deps before building and copying source so that we don't need to re-download as much -# and so that source changes don't invalidate our downloaded layer -RUN go mod download - -# Copy the go source -COPY apis/ apis/ -COPY pkg/ pkg/ -COPY version/ version/ -COPY references/ references/ - -# Build -ARG VERSION -ARG GITVERSION - -RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \ - go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}" \ - -o vela ./references/cmd/cli/main.go - -FROM hub.kubevela.net/oamdev/cloudshell:v0.2.1 -RUN apt-get install -y vim -ENV API_TOKEN_PATH=/usr/local/kubeconfig/token -COPY --from=builder /workspace/vela /usr/local/bin/vela diff --git a/charts/vela-core/templates/velaql/component-pod.yaml b/charts/vela-core/templates/velaql/component-pod.yaml index c65b66189..e8eacb3dd 100644 --- a/charts/vela-core/templates/velaql/component-pod.yaml +++ b/charts/vela-core/templates/velaql/component-pod.yaml @@ -1,3 +1,4 @@ +{{- if not (lookup "v1" "ConfigMap" (include "systemDefinitionNamespace" .) "component-pod-view") }} apiVersion: v1 data: template: | @@ -72,4 +73,5 @@ data: kind: ConfigMap metadata: name: component-pod-view - namespace: {{ include "systemDefinitionNamespace" . }} \ No newline at end of file + namespace: {{ include "systemDefinitionNamespace" . }} +{{- end }} diff --git a/charts/vela-core/templates/velaql/component-service.yaml b/charts/vela-core/templates/velaql/component-service.yaml index 2ba4dfdda..436dfac38 100644 --- a/charts/vela-core/templates/velaql/component-service.yaml +++ b/charts/vela-core/templates/velaql/component-service.yaml @@ -1,3 +1,4 @@ +{{- if not (lookup "v1" "ConfigMap" (include "systemDefinitionNamespace" .) "component-service-view") }} apiVersion: v1 data: template: | @@ -45,4 +46,5 @@ data: kind: ConfigMap metadata: name: component-service-view - namespace: {{ include "systemDefinitionNamespace" . }} \ No newline at end of file + namespace: {{ include "systemDefinitionNamespace" . }} +{{- end}} \ No newline at end of file