Skip to content

Commit

Permalink
refactor(k8s): remove in-cluster registry and cluster-docker build mo…
Browse files Browse the repository at this point in the history
…de (#3049)

* refactor(k8s): remove in-cluster registry and cluster-docker build mode

BREAKING CHANGE:

We no longer support the deprecated `cluster-docker` build mode. Please use
`cluster-buildkit` or `kaniko` for in-cluster building.

We no longer support deploying an in-cluster registry. Users must now configure
a `deploymentRegistry` in the `kubernetes` provider configuration when using
remote clusters. Please refer to the
[In-cluster building guide](https://docs.garden.io/guides/in-cluster-building)
for more information.

* chore: update examples to provide registry config + a bit of cleanup
  • Loading branch information
edvald authored Jul 21, 2022
1 parent d4b9986 commit 67047e6
Show file tree
Hide file tree
Showing 94 changed files with 419 additions and 4,893 deletions.
34 changes: 16 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ jobs:
# - Need to run with sudo to work with microk8s, because CircleCI doesn't allow us to log out
# and back in to add the circleci user to the microk8s group.
# - We currently don't support in-cluster building on microk8s.
sudo -E GARDEN_SKIP_TESTS="cluster-docker kaniko remote-only" npm run _integ
sudo -E GARDEN_SKIP_TESTS="kaniko remote-only" npm run _integ
- run:
name: Deploy demo-project
command: sudo -E ./bin/garden deploy --root examples/demo-project --logger-type basic
Expand All @@ -705,7 +705,7 @@ jobs:
skipTests:
description: Integ test groups to skip
type: string
default: "cluster-docker kaniko remote-only"
default: "kaniko remote-only"
environment:
<<: *shared-env-config
K8S_VERSION: <<parameters.kubernetesVersion>>
Expand Down Expand Up @@ -754,10 +754,6 @@ jobs:
- run:
name: Deploy demo-project
command: sudo -E ./bin/garden deploy --root examples/demo-project
- run:
name: Run cluster cleanup
command: |
sudo -E ./bin/garden plugins local-kubernetes cleanup-cluster-registry --root core/test/data/test-projects/container --env cluster-docker

test-macos:
macos:
Expand Down Expand Up @@ -885,10 +881,16 @@ workflows:
<<: *only-internal-prs
requires: [build-dist]

- e2e-project:
<<: *only-internal-prs
name: e2e-code-synchronization
project: code-synchronization
requires: [build]
- e2e-project:
<<: *only-internal-prs
name: e2e-demo-project
project: demo-project
environment: remote
requires: [build]
- e2e-project:
<<: *only-internal-prs
Expand All @@ -897,20 +899,20 @@ workflows:
requires: [build]
- e2e-project:
<<: *only-internal-prs
name: e2e-gke-kaniko-gcr
name: e2e-gke-kaniko
project: gke
environment: gke-kaniko-gcr
environment: gke-kaniko
requires: [build]
- e2e-project:
<<: *only-internal-prs
name: e2e-gke-buildkit-gcr
name: e2e-gke-buildkit
project: gke
environment: gke-buildkit-gcr
environment: gke-buildkit
requires: [build]
- e2e-project:
<<: *only-internal-prs
name: e2e-code-synchronization
project: code-synchronization
name: e2e-hadolint
project: hadolint
requires: [build]
- e2e-project:
<<: *only-internal-prs
Expand All @@ -923,11 +925,6 @@ workflows:
name: e2e-kustomize
project: kustomize
requires: [build]
- e2e-project:
<<: *only-internal-prs
name: e2e-project-variables
project: project-variables
requires: [build]
- e2e-project:
<<: *only-internal-prs
name: e2e-remote-sources
Expand All @@ -947,6 +944,7 @@ workflows:
<<: *only-internal-prs
name: e2e-vote
project: vote
environment: remote
requires: [build]
- e2e-project:
<<: *only-internal-prs
Expand All @@ -968,7 +966,7 @@ workflows:
# cluster-buildkit works on other minikube versions, but the in-cluster registry has issues on the latest version
# This is sort of fine, since we don't _really_ support in-cluster building on minikube, just been using it for
# integration tests.
skipTests: cluster-docker cluster-buildkit kaniko remote-only
skipTests: cluster-buildkit kaniko remote-only
- test-minikube:
name: vm-1.23-minikube
requires: [build]
Expand Down
6 changes: 3 additions & 3 deletions core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@
"lint": "tslint -p .",
"migration:generate": "typeorm migration:generate --config ormconfig.js -n",
"_integ": "mocha --config .mocharc.integ.yml",
"integ-kind": "GARDEN_INTEG_TEST_MODE=local GARDEN_SKIP_TESTS=\"cluster-docker cluster-buildkit cluster-buildkit-rootless kaniko remote-only\" yarn _integ",
"integ-local": "GARDEN_INTEG_TEST_MODE=local GARDEN_SKIP_TESTS=\"cluster-docker remote-only\" yarn _integ",
"integ-minikube": "GARDEN_INTEG_TEST_MODE=local GARDEN_SKIP_TESTS=\"cluster-docker in-cluster-registry remote-only\" yarn _integ",
"integ-kind": "GARDEN_INTEG_TEST_MODE=local GARDEN_SKIP_TESTS=\"cluster-buildkit cluster-buildkit-rootless kaniko remote-only\" yarn _integ",
"integ-local": "GARDEN_INTEG_TEST_MODE=local GARDEN_SKIP_TESTS=\"remote-only\" yarn _integ",
"integ-minikube": "GARDEN_INTEG_TEST_MODE=local GARDEN_SKIP_TESTS=\"remote-only\" yarn _integ",
"integ-remote": "GARDEN_INTEG_TEST_MODE=remote GARDEN_SKIP_TESTS=local-only yarn _integ",
"test": "mocha"
},
Expand Down
Loading

0 comments on commit 67047e6

Please sign in to comment.