diff --git a/.cruft.json b/.cruft.json index cdaa45d..797b895 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/projectsyn/commodore-component-template.git", - "commit": "98d16f99766e6c6d97322dbe42e058f0e2bf73d0", + "commit": "8f2273cd8ab13c55eb0f6dd621c70c4c9e4786fd", "checkout": "main", "context": { "cookiecutter": { @@ -25,7 +25,7 @@ "github_name": "component-exoscale-cloud-controller-manager", "github_url": "https://github.com/projectsyn/component-exoscale-cloud-controller-manager", "_template": "https://github.com/projectsyn/commodore-component-template.git", - "_commit": "98d16f99766e6c6d97322dbe42e058f0e2bf73d0" + "_commit": "8f2273cd8ab13c55eb0f6dd621c70c4c9e4786fd" } }, "directory": null diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8cf7be4..b0eac75 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,7 +9,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: "0" - name: Build changelog from PRs with labels diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 354cb97..706a0e5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -17,13 +17,13 @@ jobs: - lint_yaml - lint_adoc steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Run ${{ matrix.command }} run: make ${{ matrix.command }} editorconfig: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: snow-actions/eclint@v1.0.1 with: args: 'check' @@ -38,7 +38,7 @@ jobs: run: working-directory: ${{ env.COMPONENT_NAME }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: path: ${{ env.COMPONENT_NAME }} - name: Compile component @@ -54,7 +54,7 @@ jobs: run: working-directory: ${{ env.COMPONENT_NAME }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: path: ${{ env.COMPONENT_NAME }} - name: Golden diff diff --git a/Makefile.vars.mk b/Makefile.vars.mk index 44ce000..6fde2d4 100644 --- a/Makefile.vars.mk +++ b/Makefile.vars.mk @@ -26,7 +26,7 @@ DOCKER_ARGS ?= run --rm -u "$$(id -u):$$(id -g)" --userns=$(DOCKER_USERNS) -w /$ JSONNET_FILES ?= $(shell find . -type f -not -path './vendor/*' \( -name '*.*jsonnet' -or -name '*.libsonnet' \)) JSONNETFMT_ARGS ?= --in-place --pad-arrays -JSONNET_IMAGE ?= docker.io/bitnami/jsonnet:latest +JSONNET_IMAGE ?= ghcr.io/projectsyn/jsonnet:latest JSONNET_DOCKER ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) --entrypoint=jsonnetfmt $(JSONNET_IMAGE) YAMLLINT_ARGS ?= --no-warnings diff --git a/docs/modules/ROOT/pages/how-tos/deploy_ocp.adoc b/docs/modules/ROOT/pages/how-tos/deploy_ocp.adoc new file mode 100644 index 0000000..3368997 --- /dev/null +++ b/docs/modules/ROOT/pages/how-tos/deploy_ocp.adoc @@ -0,0 +1,69 @@ += Deploy on existing OpenShift cluster + +This guide describes how to deploy the Exoscale cloud-controller-manager (CCM) on an existing cluster. + +We recommend that you migrate your cluster to use https://kb.vshn.ch/oc4/how-tos/exoscale/migrate_to_instancepool.html[instancepools for the worker nodes] before deploying the CCM. + + +== Prerequisites +* cluster-admin access to the cluster to migrate +* `kubectl` +* Write access to the cluster's Syn tenant repository + +== Step-by-step guide + +. Deploy component-exoscale-cloud-controller-manager. +Add the following to your cluster's Project Syn configuration: ++ +[source,yaml] +---- +applications: + - exoscale-cloud-controller-manager +---- + +. Patch infrastructure config ++ +IMPORTANT: This step triggers node reboots to apply the Kubelet flag `--cloud-provider=external`. ++ +[source,bash] +---- +kubectl --as cluster-admin patch infrastructure.config cluster --type=merge -p '{"spec":{"platformSpec":{"external":{"platformName":"exoscale"},"type":"External"}}}' +---- ++ +[source,bash] +---- +kubectl --as=cluster-admin patch infrastructure.config cluster --type=merge --subresource=status \ + -p '{"status":{"platform":"External","platformStatus":{"external":{"cloudControllerManager":{"state":"External"}},"type":"External"}}}' +---- + +. Taint nodes with `node.cloudprovider.kubernetes.io/uninitialized=true:NoSchedule` ++ +[source,bash] +---- +kubectl --as cluster-admin taint node --all node.cloudprovider.kubernetes.io/uninitialized=true:NoSchedule +---- + +. Check if instance-type is applied ++ +[source,bash] +---- +kubectl get nodes -ocustom-columns='NAME:.metadata.name,INSTANCE_TYPE:.metadata.labels.node\.kubernetes\.io/instance-type' +---- ++ +[source,bash] +---- +NAME INSTANCE_TYPE +infra-032a standard.extra-large +infra-7b8b standard.extra-large +infra-f8e1 standard.extra-large +infra-fa1a standard.extra-large +master-03b1 standard.extra-large +master-4386 standard.extra-large +master-a662 standard.extra-large +storage-11b9 cpu.extra-large +storage-2764 cpu.extra-large +storage-5d24 cpu.extra-large +worker-e6e75-drjgz standard.extra-large +worker-e6e75-ikhpr standard.extra-large +worker-e6e75-nypky standard.extra-large +---- diff --git a/docs/modules/ROOT/partials/nav.adoc b/docs/modules/ROOT/partials/nav.adoc index 08f9283..7608451 100644 --- a/docs/modules/ROOT/partials/nav.adoc +++ b/docs/modules/ROOT/partials/nav.adoc @@ -1,2 +1,3 @@ * xref:index.adoc[Home] * xref:references/parameters.adoc[Parameters] +* xref:how-tos/deploy_ocp.adoc[Install on Existing OpenShift Cluster]