From 53362c43a355885608a7bcc092f655434beaead4 Mon Sep 17 00:00:00 2001 From: "Chang, Hui-Tang" Date: Fri, 5 Jan 2024 12:06:48 +0800 Subject: [PATCH] feat(docker-compose,helm): remove controller-vdp --- .env | 8 +- .github/CONTRIBUTING.md | 2 +- .../helm-integration-test-backend.yml | 8 - .../helm-integration-test-latest.yml | 2 +- .../helm-integration-test-release.yml | 2 +- .github/workflows/integration-test-latest.yml | 2 +- .../workflows/integration-test-release.yml | 2 +- .github/workflows/make-latest.yml | 1 - .github/workflows/releases.yml | 1 - Dockerfile | 4 +- Makefile | 26 +--- charts/vdp/templates/_helpers.tpl | 18 --- .../templates/controller-vdp/configmap.yaml | 42 ------ .../templates/controller-vdp/deployment.yaml | 139 ------------------ charts/vdp/templates/controller-vdp/hpa.yml | 33 ----- .../vdp/templates/controller-vdp/service.yaml | 19 --- .../templates/pipeline-backend/configmap.yaml | 8 - charts/vdp/values.yaml | 67 --------- docker-compose.build.yml | 9 -- docker-compose.latest.yml | 20 --- docker-compose.yml | 16 -- 21 files changed, 13 insertions(+), 416 deletions(-) delete mode 100644 charts/vdp/templates/controller-vdp/configmap.yaml delete mode 100644 charts/vdp/templates/controller-vdp/deployment.yaml delete mode 100644 charts/vdp/templates/controller-vdp/hpa.yml delete mode 100644 charts/vdp/templates/controller-vdp/service.yaml diff --git a/.env b/.env index 4610cff5..2e46b930 100644 --- a/.env +++ b/.env @@ -5,7 +5,7 @@ COMPOSE_PROJECT_NAME=instill-vdp BUILD=false # docker compose profiles to selectively launch components for developing the latest codebase of the specified component. -# the value can be all, api-gateway, mgmt, pipeline, controller-vdp, model, controller-model, or console. +# the value can be all, api-gateway, mgmt, pipeline, model, controller-model, or console. PROFILE=all # system-wise config path (all core, vdp, and model projects must use the same path) @@ -60,12 +60,6 @@ MGMT_BACKEND_PRIVATEPORT=3084 MGMT_BACKEND_PUBLICPORT=8084 MGMT_BACKEND_VERSION=0.9.0-beta -# controller-vdp -CONTROLLER_VDP_IMAGE=instill/controller-vdp -CONTROLLER_VDP_VERSION=0.1.7-beta -CONTROLLER_VDP_HOST=controller-vdp -CONTROLLER_VDP_PRIVATEPORT=3085 - # model-backend MODEL_BACKEND_HOST=model-backend MODEL_BACKEND_PUBLICPORT=8083 diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 04bd8d64..10307645 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -35,7 +35,7 @@ The env variable `PROFILE` is intended to specify which service component you wa - `{service}` - When you set `PROFILE={service}`, in which `{service}` can be `controller-vdp` or `pipeline`, it means you want to develop on that particular service. The `make` command will launch the corresponding stack **WITHOUT** that service component and **WITH** all its dependencies. Given that, you can later on spin up and down the `{service}` in your dev container. Please take the [pipeline-backend](https://github.com/instill-ai/pipeline-backend#local-dev) as an example. + When you set `PROFILE={service}`, in which `{service}` can be `pipeline`, it means you want to develop on that particular service. The `make` command will launch the corresponding stack **WITHOUT** that service component and **WITH** all its dependencies. Given that, you can later on spin up and down the `{service}` in your dev container. Please take the [pipeline-backend](https://github.com/instill-ai/pipeline-backend#local-dev) as an example. ### Tear down the local dev system diff --git a/.github/workflows/helm-integration-test-backend.yml b/.github/workflows/helm-integration-test-backend.yml index 64637eac..3dcb836d 100644 --- a/.github/workflows/helm-integration-test-backend.yml +++ b/.github/workflows/helm-integration-test-backend.yml @@ -98,10 +98,8 @@ jobs: --set edition=k8s-ce:test \ --set pipelineBackend.image.tag=latest \ --set pipelineBackend.excludelocalconnector=false \ - --set controllerVDP.image.tag=latest \ --set tags.observability=false kubectl rollout status deployment vdp-pipeline-backend --namespace instill-ai - kubectl rollout status deployment vdp-controller-vdp --namespace instill-ai sleep 10 - name: Run ${{ inputs.component }} integration test (latest) @@ -219,10 +217,8 @@ jobs: --set edition=k8s-ce:test \ --set pipelineBackend.image.tag=latest \ --set pipelineBackend.excludelocalconnector=false \ - --set controllerVDP.image.tag=latest \ --set tags.observability=false kubectl rollout status deployment vdp-pipeline-backend --namespace instill-ai --timeout=120s - kubectl rollout status deployment vdp-controller-vdp --namespace instill-ai --timeout=120s sleep 10 - name: Run ${{ inputs.component }} integration test (latest) @@ -330,10 +326,8 @@ jobs: --set edition=k8s-ce:test \ --set pipelineBackend.image.tag=${PIPELINE_BACKEND_VERSION} \ --set pipelineBackend.excludelocalconnector=false \ - --set controllerVDP.image.tag=${CONTROLLER_VDP_VERSION} \ --set tags.observability=false kubectl rollout status deployment vdp-pipeline-backend --namespace instill-ai - kubectl rollout status deployment vdp-controller-vdp --namespace instill-ai sleep 10 - name: Run ${{ inputs.component }} integration test (release) @@ -457,10 +451,8 @@ jobs: --set edition=k8s-ce:test \ --set pipelineBackend.image.tag=${PIPELINE_BACKEND_VERSION} \ --set pipelineBackend.excludelocalconnector=false \ - --set controllerVDP.image.tag=${CONTROLLER_VDP_VERSION} \ --set tags.observability=false kubectl rollout status deployment vdp-pipeline-backend --namespace instill-ai --timeout=120s - kubectl rollout status deployment vdp-controller-vdp --namespace instill-ai --timeout=120s sleep 10 - name: Run ${{ inputs.component }} integration test (release) diff --git a/.github/workflows/helm-integration-test-latest.yml b/.github/workflows/helm-integration-test-latest.yml index 39e4f6db..e2387623 100644 --- a/.github/workflows/helm-integration-test-latest.yml +++ b/.github/workflows/helm-integration-test-latest.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - component: [pipeline-backend, controller-vdp] + component: [pipeline-backend] uses: instill-ai/vdp/.github/workflows/helm-integration-test-backend.yml@main with: component: ${{ matrix.component }} diff --git a/.github/workflows/helm-integration-test-release.yml b/.github/workflows/helm-integration-test-release.yml index 22e77279..70582085 100644 --- a/.github/workflows/helm-integration-test-release.yml +++ b/.github/workflows/helm-integration-test-release.yml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - component: [pipeline-backend, controller-vdp] + component: [pipeline-backend] uses: instill-ai/vdp/.github/workflows/helm-integration-test-backend.yml@main with: component: ${{ matrix.component }} diff --git a/.github/workflows/integration-test-latest.yml b/.github/workflows/integration-test-latest.yml index 49438ff4..cd18f8aa 100644 --- a/.github/workflows/integration-test-latest.yml +++ b/.github/workflows/integration-test-latest.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - component: [pipeline-backend, controller-vdp] + component: [pipeline-backend] uses: instill-ai/vdp/.github/workflows/integration-test-backend.yml@main with: component: ${{ matrix.component }} diff --git a/.github/workflows/integration-test-release.yml b/.github/workflows/integration-test-release.yml index 6eb687ef..b3994a60 100644 --- a/.github/workflows/integration-test-release.yml +++ b/.github/workflows/integration-test-release.yml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - component: [pipeline-backend, controller-vdp] + component: [pipeline-backend] uses: instill-ai/vdp/.github/workflows/integration-test-backend.yml@main with: component: ${{ matrix.component }} diff --git a/.github/workflows/make-latest.yml b/.github/workflows/make-latest.yml index 7be8f1f4..ae5c106e 100644 --- a/.github/workflows/make-latest.yml +++ b/.github/workflows/make-latest.yml @@ -62,7 +62,6 @@ jobs: run: | curl -s -o /dev/null -w ''%{http_code}'\n' http://localhost:8080/core/v1beta/health/mgmt curl -s -o /dev/null -w ''%{http_code}'\n' http://localhost:8080/vdp/v1beta/health/pipeline - curl -s -o /dev/null -w ''%{http_code}'\n' http://localhost:3085/v1beta/health/controller - name: Tear down Instill VDP (latest) run: | diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index eda32b0d..c7e71b0f 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -76,7 +76,6 @@ jobs: run: | source .env yq ".pipelineBackend.image.tag=\"$PIPELINE_BACKEND_VERSION\"" -i charts/vdp/values.yaml - yq ".controllerVDP.image.tag=\"$CONTROLLER_VDP_VERSION\"" -i charts/vdp/values.yaml - name: Get current chart version id: get-current-chart-version run: | diff --git a/Dockerfile b/Dockerfile index e037b0e2..48fe8c27 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,6 @@ RUN git clone https://github.com/instill-ai/core.git WORKDIR /instill-ai/vdp RUN git clone https://github.com/instill-ai/pipeline-backend.git -RUN git clone https://github.com/instill-ai/controller-vdp.git FROM alpine:${ALPINE_VERSION} AS release @@ -52,6 +51,5 @@ RUN git clone -b v${INSTILL_CORE_VERSION} -c advice.detachedHead=false https://g WORKDIR /instill-ai/vdp -ARG PIPELINE_BACKEND_VERSION CONTROLLER_VDP_VERSION +ARG PIPELINE_BACKEND_VERSION RUN git clone -b v${PIPELINE_BACKEND_VERSION} -c advice.detachedHead=false https://github.com/instill-ai/pipeline-backend.git -RUN git clone -b v${CONTROLLER_VDP_VERSION} -c advice.detachedHead=false https://github.com/instill-ai/controller-vdp.git diff --git a/Makefile b/Makefile index cc43ba36..e68cee9c 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,6 @@ all: ## Launch all services with their up-to-date release version --build-arg CACHE_DATE="$(shell date)" \ --build-arg INSTILL_CORE_VERSION=${INSTILL_CORE_VERSION} \ --build-arg PIPELINE_BACKEND_VERSION=${PIPELINE_BACKEND_VERSION} \ - --build-arg CONTROLLER_VDP_VERSION=${CONTROLLER_VDP_VERSION} \ --target release \ -t ${CONTAINER_COMPOSE_IMAGE_NAME}:${INSTILL_VDP_VERSION} .; \ fi @@ -161,7 +160,6 @@ build-latest: ## Build latest images for all VDP components --name ${CONTAINER_BUILD_NAME}-latest \ ${CONTAINER_COMPOSE_IMAGE_NAME}:latest /bin/sh -c " \ PIPELINE_BACKEND_VERSION=latest \ - CONTROLLER_VDP_VERSION=latest \ docker compose -f docker-compose.build.yml build --progress plain \ " @@ -174,7 +172,6 @@ build-release: ## Build release images for all VDP components --build-arg CACHE_DATE="$(shell date)" \ --build-arg INSTILL_CORE_VERSION=${INSTILL_CORE_VERSION} \ --build-arg PIPELINE_BACKEND_VERSION=${PIPELINE_BACKEND_VERSION} \ - --build-arg CONTROLLER_VDP_VERSION=${CONTROLLER_VDP_VERSION} \ --target release \ -t ${CONTAINER_COMPOSE_IMAGE_NAME}:${INSTILL_VDP_VERSION} . @docker run --rm \ @@ -185,7 +182,6 @@ build-release: ## Build release images for all VDP components ${CONTAINER_COMPOSE_IMAGE_NAME}:${INSTILL_VDP_VERSION} /bin/sh -c " \ INSTILL_CORE_VERSION=${INSTILL_CORE_VERSION} \ PIPELINE_BACKEND_VERSION=${PIPELINE_BACKEND_VERSION} \ - CONTROLLER_VDP_VERSION=${CONTROLLER_VDP_VERSION} \ docker compose -f docker-compose.build.yml build --progress plain \ " @@ -196,8 +192,7 @@ integration-test-latest: ## Run integration test on the latest VDP --network instill-network \ --name ${CONTAINER_BACKEND_INTEGRATION_TEST_NAME}-latest \ ${CONTAINER_COMPOSE_IMAGE_NAME}:latest /bin/sh -c " \ - /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd controller-vdp && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' \ + /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' \ " @make down @@ -208,8 +203,7 @@ integration-test-release: ## Run integration test on the release VDP --network instill-network \ --name ${CONTAINER_BACKEND_INTEGRATION_TEST_NAME}-release \ ${CONTAINER_COMPOSE_IMAGE_NAME}:${INSTILL_VDP_VERSION} /bin/sh -c " \ - /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd controller-vdp && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' \ + /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' \ " @make down @@ -245,20 +239,16 @@ helm-integration-test-latest: ## Run integration test on t --set edition=k8s-ce:test \ --set pipelineBackend.image.tag=latest \ --set pipelineBackend.excludelocalconnector=false \ - --set controllerVDP.image.tag=latest \ --set tags.observability=false @kubectl rollout status deployment vdp-pipeline-backend --namespace ${HELM_NAMESPACE} --timeout=120s - @kubectl rollout status deployment vdp-controller-vdp --namespace ${HELM_NAMESPACE} --timeout=120s @sleep 30 ifeq ($(UNAME_S),Darwin) @docker run --rm --name ${CONTAINER_BACKEND_INTEGRATION_TEST_NAME}-helm-latest ${CONTAINER_COMPOSE_IMAGE_NAME}:latest /bin/sh -c " \ - /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd controller-vdp && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' \ + /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' \ " else ifeq ($(UNAME_S),Linux) @docker run --rm --network host --name ${CONTAINER_BACKEND_INTEGRATION_TEST_NAME}-helm-latest ${CONTAINER_COMPOSE_IMAGE_NAME}:latest /bin/sh -c " \ - /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd controller-vdp && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' \ + /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' \ " endif @helm uninstall ${HELM_RELEASE_NAME} --namespace ${HELM_NAMESPACE} @@ -299,20 +289,16 @@ helm-integration-test-release: ## Run integration test on --set edition=k8s-ce:test \ --set pipelineBackend.image.tag=${PIPELINE_BACKEND_VERSION} \ --set pipelineBackend.excludelocalconnector=false \ - --set controllerVDP.image.tag=${CONTROLLER_VDP_VERSION} \ --set tags.observability=false @kubectl rollout status deployment vdp-pipeline-backend --namespace ${HELM_NAMESPACE} --timeout=120s - @kubectl rollout status deployment vdp-controller-vdp --namespace ${HELM_NAMESPACE} --timeout=120s @sleep 10 ifeq ($(UNAME_S),Darwin) @docker run --rm --name ${CONTAINER_BACKEND_INTEGRATION_TEST_NAME}-helm-release ${CONTAINER_COMPOSE_IMAGE_NAME}:${INSTILL_VDP_VERSION} /bin/sh -c " \ - /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd controller-vdp && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' \ + /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' \ " else ifeq ($(UNAME_S),Linux) @docker run --rm --network host --name ${CONTAINER_BACKEND_INTEGRATION_TEST_NAME}-helm-release ${CONTAINER_COMPOSE_IMAGE_NAME}:${INSTILL_VDP_VERSION} /bin/sh -c " \ - /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd controller-vdp && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' \ + /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' \ " endif @helm uninstall ${HELM_RELEASE_NAME} --namespace ${HELM_NAMESPACE} diff --git a/charts/vdp/templates/_helpers.tpl b/charts/vdp/templates/_helpers.tpl index 2d945bb6..a6ba4594 100644 --- a/charts/vdp/templates/_helpers.tpl +++ b/charts/vdp/templates/_helpers.tpl @@ -112,11 +112,6 @@ app.kubernetes.io/name: {{ include "vdp.name" . }} {{- printf "%s-pipeline-backend" (include "vdp.fullname" .) -}} {{- end -}} - -{{- define "vdp.controllerVDP" -}} - {{- printf "%s-controller-vdp" (include "vdp.fullname" .) -}} -{{- end -}} - {{- define "model.modelBackend" -}} {{- print "model-model-backend" -}} {{- end -}} @@ -147,11 +142,6 @@ app.kubernetes.io/name: {{ include "vdp.name" . }} {{- printf "3081" -}} {{- end -}} -{{/* controller service and container private port */}} -{{- define "vdp.controllerVDP.privatePort" -}} - {{- printf "3085" -}} -{{- end -}} - {{/* mgmt-backend service and container public port */}} {{- define "core.mgmtBackend.publicPort" -}} {{- printf "8084" -}} @@ -209,14 +199,6 @@ app.kubernetes.io/name: {{ include "vdp.name" . }} {{- end -}} {{- end -}} -{{- define "vdp.internalTLS.controllerVDP.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.controllerVDP.secretName -}} - {{- else -}} - {{- printf "%s-controller-vdp-internal-tls" (include "vdp.fullname" .) -}} - {{- end -}} -{{- end -}} - {{/* Allow KubeVersion to be overridden. */}} {{- define "vdp.ingress.kubeVersion" -}} {{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}} diff --git a/charts/vdp/templates/controller-vdp/configmap.yaml b/charts/vdp/templates/controller-vdp/configmap.yaml deleted file mode 100644 index f4de806b..00000000 --- a/charts/vdp/templates/controller-vdp/configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "vdp.controllerVDP" . }} - labels: - {{- include "vdp.labels" . | nindent 4 }} - app.kubernetes.io/component: controller-vdp -data: - config.yaml: |+ - server: - privateport: {{ template "vdp.controllerVDP.privatePort" . }} - edition: {{ .Values.edition }} - loopinterval: {{ .Values.controllerVDP.loopinterval }} - timeout: 120 - debug: {{ ternary "true" "false" (eq (.Values.logLevel | upper) "DEBUG") }} - {{- if .Values.internalTLS.enabled }} - https: - cert: /etc/instill-ai/vdp/ssl/controller/tls.crt - key: /etc/instill-ai/vdp/ssl/controller/tls.key - {{- end }} - etcd: - host: {{ template "core.etcd" . }} - port: {{ template "core.etcd.clientPort" . }} - timeout: 5 - pipelinebackend: - host: {{ template "vdp.pipelineBackend" . }} - publicport: {{ template "vdp.pipelineBackend.publicPort" . }} - privateport: {{ template "vdp.pipelineBackend.privatePort" . }} - {{- if .Values.internalTLS.enabled }} - https: - cert: /etc/instill-ai/vdp/ssl/pipeline/tls.crt - key: /etc/instill-ai/vdp/ssl/pipeline/tls.key - {{- end }} - mgmtbackend: - host: {{ template "core.mgmtBackend" . }} - publicport: {{ template "core.mgmtBackend.publicPort" . }} - privateport: {{ template "core.mgmtBackend.privatePort" . }} - {{- if .Values.internalTLS.enabled }} - https: - cert: /etc/instill-ai/vdp/ssl/mgmt/tls.crt - key: /etc/instill-ai/vdp/ssl/mgmt/tls.key - {{- end }} diff --git a/charts/vdp/templates/controller-vdp/deployment.yaml b/charts/vdp/templates/controller-vdp/deployment.yaml deleted file mode 100644 index 322a59e4..00000000 --- a/charts/vdp/templates/controller-vdp/deployment.yaml +++ /dev/null @@ -1,139 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "vdp.controllerVDP" . }} - labels: - {{- include "vdp.labels" . | nindent 4 }} - app.kubernetes.io/component: controller-vdp - annotations: - rollme: {{ randAlphaNum 5 | quote }} -spec: - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "RollingUpdate" }} - rollingUpdate: - maxSurge: {{ .Values.updateStrategy.rollingUpdate.maxSurge }} - maxUnavailable: {{ .Values.updateStrategy.rollingUpdate.maxUnavailable }} - {{- else}} - rollingUpdate: null - {{- end }} - {{- if not .Values.controllerVDP.autoscaling.enabled }} - replicas: {{ .Values.controllerVDP.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "vdp.matchLabels" . | nindent 6 }} - app.kubernetes.io/component: controller-vdp - template: - metadata: - labels: - {{- include "vdp.matchLabels" . | nindent 8 }} - app.kubernetes.io/component: controller-vdp - annotations: - checksum/config: {{ include (print $.Template.BasePath "/controller-vdp/configmap.yaml") . | sha256sum }} - {{- with .Values.controllerVDP.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - # Ubuntu nobody:nogroup is 65534:65534 - securityContext: - runAsUser: 65532 - runAsGroup: 65532 - {{- if .Values.controllerVDP.serviceAccountName }} - serviceAccountName: {{ .Values.controllerVDP.serviceAccountName }} - {{- end }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.controllerVDP.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - initContainers: - - name: wait-for-dependencies - image: curlimages/curl:8.00.1 - command: ['sh', '-c'] - args: - - > - while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${ETCD_HOST}:${ETCD_CLIENT_PORT}/health)" != "200" ]]; do echo waiting for etcd; sleep 1; done && - while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${PIPELINE_BACKEND_HOST}:${PIPELINE_BACKEND_PORT}/v1beta/health/pipeline)" != "200" ]]; do echo waiting for pipeline-backend; sleep 1; done && - while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${MGMT_BACKEND_HOST}:${MGMT_BACKEND_PORT}/v1beta/health/mgmt)" != "200" ]]; do echo waiting for mgmt-backend; sleep 1; done - env: - - name: PIPELINE_BACKEND_HOST - value: "{{ template "vdp.pipelineBackend" . }}" - - name: PIPELINE_BACKEND_PORT - value: "{{ template "vdp.pipelineBackend.publicPort" . }}" - - name: MGMT_BACKEND_HOST - value: "{{ template "core.mgmtBackend" . }}" - - name: MGMT_BACKEND_PORT - value: "{{ template "core.mgmtBackend.publicPort" . }}" - - name: ETCD_HOST - value: "{{ template "core.etcd" . }}" - - name: ETCD_CLIENT_PORT - value: "{{ template "core.etcd.clientPort" . }}" - containers: - - name: controller - image: {{ .Values.controllerVDP.image.repository }}:{{ .Values.controllerVDP.image.tag }} - imagePullPolicy: {{ .Values.controllerVDP.image.pullPolicy }} - readinessProbe: - httpGet: - path: /v1beta/__readiness - scheme: {{ ternary "https" "http" .Values.internalTLS.enabled | upper }} - port: {{ ternary "https" "http" .Values.internalTLS.enabled }}-private - initialDelaySeconds: 5 - periodSeconds: 10 - livenessProbe: - httpGet: - path: /v1beta/__liveness - scheme: {{ ternary "https" "http" .Values.internalTLS.enabled | upper }} - port: {{ ternary "https" "http" .Values.internalTLS.enabled }}-private - initialDelaySeconds: 5 - periodSeconds: 10 - {{- if .Values.controllerVDP.resources }} - resources: - {{- toYaml .Values.controllerVDP.resources | nindent 12 }} - {{- end }} - command: [./{{ .Values.controllerVDP.commandName.main }}] - ports: - - name: {{ ternary "https" "http" .Values.internalTLS.enabled }}-private - containerPort: {{ template "vdp.controllerVDP.privatePort" . }} - protocol: TCP - volumeMounts: - - name: config - mountPath: {{ .Values.controllerVDP.configPath }} - subPath: config.yaml - {{- if .Values.internalTLS.enabled }} - - name: controller-internal-certs - mountPath: "/etc/instill-ai/vdp/ssl/controller" - {{- end }} - {{- with .Values.controllerVDP.extraVolumeMounts }} - {{- toYaml . | nindent 12 }} - {{- end }} - env: - {{- if .Values.controllerVDP.extraEnv }} - {{- toYaml .Values.controllerVDP.extraEnv | nindent 12 }} - {{- end }} - {{- with .Values.controllerVDP.sidecarContainers }} - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - configMap: - name: {{ template "vdp.controllerVDP" . }} - - name: controller-internal-certs - secret: - secretName: {{ template "vdp.internalTLS.controllerVDP.secretName" . }} - {{- with .Values.controllerVDP.extraVolumes }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.controllerVDP.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.controllerVDP.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.controllerVDP.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/charts/vdp/templates/controller-vdp/hpa.yml b/charts/vdp/templates/controller-vdp/hpa.yml deleted file mode 100644 index a0a1f5dd..00000000 --- a/charts/vdp/templates/controller-vdp/hpa.yml +++ /dev/null @@ -1,33 +0,0 @@ -{{- if .Values.controllerVDP.autoscaling.enabled }} -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ template "vdp.controllerVDP" . }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ template "vdp.controllerVDP" . }} - labels: - {{- include "vdp.labels" . | nindent 4 }} - app.kubernetes.io/component: controller-vdp - minReplicas: {{ .Values.controllerVDP.autoscaling.minReplicas }} - maxReplicas: {{ .Values.controllerVDP.autoscaling.maxReplicas }} - metrics: -{{- with .Values.controllerVDP.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: {{ . }} -{{- end }} -{{- with .Values.controllerVDP.autoscaling.targetAverageMemoryUtilization }} - - type: Resource - resource: - name: memory - target: - type: AverageValue - averageValue: {{ . }} -{{- end }} -{{- end }} diff --git a/charts/vdp/templates/controller-vdp/service.yaml b/charts/vdp/templates/controller-vdp/service.yaml deleted file mode 100644 index c724fd32..00000000 --- a/charts/vdp/templates/controller-vdp/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "vdp.controllerVDP" . }} - labels: - {{- include "vdp.labels" . | nindent 4 }} - app.kubernetes.io/component: controller-vdp - {{- with .Values.controllerVDP.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - ports: - - name: {{ ternary "https" "http" .Values.internalTLS.enabled }}-private - port: {{ template "vdp.controllerVDP.privatePort" . }} - targetPort: {{ template "vdp.controllerVDP.privatePort" . }} - selector: - {{- include "vdp.matchLabels" . | nindent 4 }} - app.kubernetes.io/component: controller-vdp diff --git a/charts/vdp/templates/pipeline-backend/configmap.yaml b/charts/vdp/templates/pipeline-backend/configmap.yaml index d80079bc..c05d7efd 100644 --- a/charts/vdp/templates/pipeline-backend/configmap.yaml +++ b/charts/vdp/templates/pipeline-backend/configmap.yaml @@ -50,14 +50,6 @@ data: cert: /etc/instill-ai/vdp/ssl/model/tls.crt key: /etc/instill-ai/vdp/ssl/model/tls.key {{- end }} - controller: - host: {{ template "vdp.controllerVDP" . }} - privateport: {{ template "vdp.controllerVDP.privatePort" . }} - {{- if .Values.internalTLS.enabled }} - https: - cert: /etc/instill-ai/vdp/ssl/controller/tls.crt - key: /etc/instill-ai/vdp/ssl/controller/tls.key - {{- end }} database: username: {{ default (include "core.database.username" .) .Values.database.username }} password: {{ default (include "core.database.rawPassword" .) .Values.database.password }} diff --git a/charts/vdp/values.yaml b/charts/vdp/values.yaml index 1ef1b1ce..622203e8 100644 --- a/charts/vdp/values.yaml +++ b/charts/vdp/values.yaml @@ -40,14 +40,6 @@ internalTLS: crt: "" # Content of pipeline-backend's TLS key file, only available when `certSource` is "manual" key: "" - # controller-vdp related cert configuration - controllerVDP: - # secret name for controller-vdp's tls certs, only available when `certSource` is "secret" - secretName: "" - # Content of controller-vdp's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of controller-vdp's TLS key file, only available when `certSource` is "manual" - key: "" # -- The usage collector configuration usage: enabled: true @@ -138,65 +130,6 @@ pipelineBackend: minAvailable: maxUnavailable: copyHostDocker: false -controllerVDP: - # -- The image of controller - image: - repository: instill/controller-vdp - tag: 0.1.7-beta - pullPolicy: IfNotPresent - # -- The command names to be executed - commandName: - main: controller-vdp - # -- The path of configuration file for mgmt-backend - configPath: /controller-vdp/config/config.yaml - # -- Set the service account to be used, default if left empty - serviceAccountName: "" - # -- Mount the service account token - automountServiceAccountToken: false - # -- The number of replica for controller - replicaCount: 1 - # -- Add extra env variables - extraEnv: [] - # -- Mount external volumes - # For example, mount a secret containing Certificate root CA to verify database - # TLS connection. - extraVolumes: [] - # - name: my-volume - # secret: - # secretName: my-secret - extraVolumeMounts: [] - # - name: my-volume - # mountPath: /etc/secrets/my-secret - # readOnly: true - # -- Add extra init containers - extraInitContainers: [] - # extraInitContainers: - # - name: ... - # image: ... - # -- Add extra sidecar containers - sidecarContainers: {} - # -- Additional deployment annotations - podAnnotations: {} - # -- Additional service annotations - serviceAnnotations: {} - resources: {} - loopinterval: 3 - autoscaling: - enabled: false - minReplicas: - maxReplicas: - targetCPUUtilizationPercentage: - targetAverageMemoryUtilization: - pipelineBackendWorkerMemoryUtilization: - pipelineBackendMemoryUtilization: - nodeSelector: {} - tolerations: [] - affinity: {} - podDisruptionBudget: - enabled: false - spec: - minAvailable: - maxUnavailable: database: # -- The host of database host: diff --git a/docker-compose.build.yml b/docker-compose.build.yml index f2c6fe1e..cb26e6f3 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -10,12 +10,3 @@ services: SERVICE_NAME: ${PIPELINE_BACKEND_HOST} GOLANG_VERSION: ${GOLANG_VERSION} K6_VERSION: ${K6_VERSION} - - controller_vdp: - image: ${CONTROLLER_VDP_IMAGE}:${CONTROLLER_VDP_VERSION} - build: - context: ./${CONTROLLER_VDP_HOST} - args: - SERVICE_NAME: ${CONTROLLER_VDP_HOST} - GOLANG_VERSION: ${GOLANG_VERSION} - K6_VERSION: ${K6_VERSION} diff --git a/docker-compose.latest.yml b/docker-compose.latest.yml index ac93d9ad..e34c0416 100644 --- a/docker-compose.latest.yml +++ b/docker-compose.latest.yml @@ -8,7 +8,6 @@ services: - api-gateway - mgmt - console - - controller-vdp - model - controller-model image: ${PIPELINE_BACKEND_IMAGE}:latest @@ -19,7 +18,6 @@ services: - api-gateway - mgmt - console - - controller-vdp - model - controller-model image: ${PIPELINE_BACKEND_IMAGE}:latest @@ -30,7 +28,6 @@ services: - api-gateway - mgmt - console - - controller-vdp - model - controller-model image: ${PIPELINE_BACKEND_IMAGE}:latest @@ -47,26 +44,9 @@ services: - api-gateway - mgmt - console - - controller-vdp - model - controller-model image: ${PIPELINE_BACKEND_IMAGE}:latest environment: CFG_SERVER_DEBUG: "true" CFG_SERVER_EDITION: ${EDITION} - - controller_vdp: - profiles: - - all - - api-gateway - - mgmt - - console - - pipeline - - model - - controller-model - image: ${CONTROLLER_VDP_IMAGE}:latest - environment: - CFG_SERVER_DEBUG: "true" - CFG_SERVER_EDITION: ${EDITION} - ports: - - ${CONTROLLER_VDP_PRIVATEPORT}:${CONTROLLER_VDP_PRIVATEPORT} diff --git a/docker-compose.yml b/docker-compose.yml index a8c15a99..588611cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -108,22 +108,6 @@ services: pipeline_backend_migrate: condition: service_completed_successfully - controller_vdp: - container_name: ${CONTROLLER_VDP_HOST} - image: ${CONTROLLER_VDP_IMAGE}:${CONTROLLER_VDP_VERSION} - restart: unless-stopped - environment: - CFG_SERVER_DEBUG: "false" - CFG_SERVER_EDITION: ${EDITION} - CFG_DATABASE_HOST: ${POSTGRESQL_HOST} - CFG_DATABASE_PORT: ${POSTGRESQL_PORT} - CFG_DATABASE_USERNAME: postgres - CFG_DATABASE_PASSWORD: password - CFG_ETCD_PORT: ${ETCD_CLIENT_PORT} - CFG_LOG_EXTERNAL: ${OBSERVE_ENABLED} - CFG_LOG_OTELCOLLECTOR_PORT: ${OTEL_COLLECTOR_PORT} - entrypoint: ./controller-vdp - socat: container_name: ${SOCAT_HOST} image: ${SOCAT_IMAGE}:${SOCAT_VERSION}