diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index d0f63fcd06..bf8699028a 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -176,7 +176,7 @@ jobs: working-directory: ./${{ matrix.config.folder }} run: make controller-gen - - name: Generate test release manifest + - name: Generate release.yaml if: matrix.config.name != 'functions-runtime' && matrix.config.name != 'python-runtime' working-directory: ./${{ matrix.config.folder }} env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3d6adc40c4..a2ac774c4f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -194,6 +194,149 @@ jobs: tag_name: ${{ matrix.config.tagName }} files: ./sbom-${{ matrix.config.name }}.spdx.json + release-manifests: + if: needs.release-please.outputs.releases-created == 'true' + needs: + - release-please + - build-release + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Cache build tools lifecycle-operator + if: needs.release-please.outputs.klt-release-created == 'true' + id: cache-build-tools-lifecycle-operator + uses: actions/cache@v3 + with: + path: ./lifecycle-operator/bin + key: build-tools-${{ github.ref_name }} + + - name: Cache build tools metrics-operator + if: needs.release-please.outputs.metrics-operator-release-created == 'true' + id: cache-build-tools-metrics-operator + uses: actions/cache@v3 + with: + path: ./metrics-operator/bin + key: build-tools-${{ github.ref_name }} + + - name: Cache build tools scheduler + if: needs.release-please.outputs.klt-release-created == 'true' + id: cache-build-tools-scheduler + uses: actions/cache@v3 + with: + path: ./scheduler/bin + key: build-tools-${{ github.ref_name }} + + - name: Cache build tools cert-manager + if: needs.release-please.outputs.cert-manager-release-created == 'true' + id: cache-build-tools-klt-cert-manager + uses: actions/cache@v3 + with: + path: ./klt-cert-manager/bin + key: build-tools-${{ github.ref_name }} + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: ${{ env.GO_VERSION }} + check-latest: true + + - name: Create KLT manifest + if: needs.release-please.outputs.klt-release-created == 'true' + env: + RELEASE_REGISTRY: ghcr.io/keptn + CHART_APPVERSION: ${{ needs.release-please.outputs.klt-tag-name }} + run: | + cd scheduler + make release-manifests + cd ../lifecycle-operator + make controller-gen release-manifests + cd ../klt-cert-manager + make controller-gen release-manifests + cd ../metrics-operator + make controller-gen release-manifests + cd .. + echo "---" >> lifecycle-operator/config/rendered/release.yaml + echo "---" >> scheduler/config/rendered/release.yaml + echo "---" >> klt-cert-manager/config/rendered/release.yaml + cat >> namespace.yaml << EOF + --- + apiVersion: v1 + kind: Namespace + metadata: + name: keptn-lifecycle-toolkit-system + --- + EOF + cat namespace.yaml \ + lifecycle-operator/config/rendered/release.yaml \ + scheduler/config/rendered/release.yaml \ + klt-cert-manager/config/rendered/release.yaml \ + metrics-operator/config/rendered/release.yaml > klt-manifest.yaml + + - name: Create Cert-Manager manifest + if: needs.release-please.outputs.cert-manager-release-created == 'true' + env: + RELEASE_REGISTRY: ghcr.io/keptn + CHART_APPVERSION: ${{ needs.release-please.outputs.cert-manager-tag-name }} + run: | + cd klt-cert-manager + make controller-gen release-manifests + cd .. + echo "---" >> klt-cert-manager/config/rendered/release.yaml + cat >> namespace.yaml << EOF + --- + apiVersion: v1 + kind: Namespace + metadata: + name: keptn-lifecycle-toolkit-system + --- + EOF + cat namespace.yaml \ + klt-cert-manager/config/rendered/release.yaml > cert-manager-manifest.yaml + + - name: Create Metrics Operator manifest + if: needs.release-please.outputs.metrics-operator-release-created == 'true' + env: + RELEASE_REGISTRY: ghcr.io/keptn + CHART_APPVERSION: ${{ needs.release-please.outputs.metrics-operator-tag-name }} + run: | + cd metrics-operator + make controller-gen release-manifests + cd .. + echo "---" >> metrics-operator/config/rendered/release.yaml + cat >> namespace.yaml << EOF + --- + apiVersion: v1 + kind: Namespace + metadata: + name: keptn-lifecycle-toolkit-system + --- + EOF + cat namespace.yaml \ + metrics-operator/config/rendered/release.yaml > metrics-operator-manifest.yaml + + - name: Attach KLT release assets + if: needs.release-please.outputs.klt-release-created == 'true' + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ needs.release-please.outputs.klt-tag-name }} + files: klt-manifest.yaml + + - name: Attach Cert-Manager release assets + if: needs.release-please.outputs.cert-manager-release-created == 'true' + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ needs.release-please.outputs.cert-manager-tag-name }} + files: cert-manager-manifest.yaml + + - name: Attach Metrics Operator release assets + if: needs.release-please.outputs.metrics-operator-release-created == 'true' + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ needs.release-please.outputs.metrics-operator-tag-name }} + files: metrics-operator-manifest.yaml + update-docs: name: Update Documentation needs: diff --git a/README.md b/README.md index 06616e2b20..2244badd01 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ is handled automatically by [klt-cert-manager](https://github.com/keptn/lifecycle-toolkit/blob/main/klt-cert-manager/README.md). Versions 0.6.0 and earlier have a hard dependency on the [cert-manager](https://cert-manager.io). -See [installation guideline](https://lifecycle.keptn.sh/docs/install/cert-manager/) +See [installation guideline](https://github.com/keptn/lifecycle-toolkit/blob/main/docs/content/en/docs/snippets/tasks/install.md) for more info. ## Goals diff --git a/docs/content/en/docs/install/install.md b/docs/content/en/docs/install/install.md index 91fd5c9735..2fa1b2617b 100644 --- a/docs/content/en/docs/install/install.md +++ b/docs/content/en/docs/install/install.md @@ -19,7 +19,7 @@ Two methods are supported for installing the Keptn Lifecycle Toolkit (KLT): the [Helm Chart](#use-helm-chart). This is the preferred strategy because it allows you to customize your cluster. -* Releases v0.10.0 and earlier can be installed using +* All releases can be installed using the [manifests](#use-manifests). This is the less-preferred way because it does not support customization. @@ -109,9 +109,10 @@ For more information,see ## Use manifests -Versions v0.10.0 and earlier of the Lifecycle Toolkit can be installed using manifests, +All versions of the Lifecycle Toolkit can be installed using manifests, although we recommend that you use Helm Charts -because they allow you to easily customize your configuration. +to install Version 0.7.0 and later +because the Helm Charts allow you to customize your configuration. Versions 0.6.0 and earlier can only be installed using manifests. diff --git a/docs/content/en/docs/snippets/tasks/install.md b/docs/content/en/docs/snippets/tasks/install.md new file mode 100644 index 0000000000..7e3ee88434 --- /dev/null +++ b/docs/content/en/docs/snippets/tasks/install.md @@ -0,0 +1,59 @@ +# Installation Instructions + +## Install version 0.7.0 and above + +In version 0.7.0 and later, you can install the Lifecycle Toolkit using either helm charts or manifests. + +For installing the Lifecycle Toolkit via Helm chart: + +```shell +helm repo add klt https://charts.lifecycle.keptn.sh +helm repo update +helm upgrade --install keptn klt/klt -n keptn-lifecycle-toolkit-system --create-namespace --wait +``` + +To install a specific version, use the `--version ` flag as part of the +`helm upgrade --install` command. + +To list available versions: + +```shell +helm repo update +helm search repo keptn-lifecycle-toolkit +``` + +The `helm upgrade --install` command offers a flag called `--set`, which can be used to specify +configuration options using the format key1=value1,key2=value2,.... + +Or you could download the chart value file and modify it using + +```shell +helm get values RELEASE_NAME [flags] > values.yaml +``` + +and install adding `--values=values.yaml` to your `helm upgrade` command (official documentation +available [here](https://helm.sh/docs/helm/helm_get_values/)). + +The full list of available flags can be found in the [helm-charts](https://github.com/keptn/lifecycle-toolkit/blob/main/helm/chart/README.md). + +> **Note** +Installation of the Lifecycle Toolkit version 0.6.0 and lower is not supported via helm charts. + +
+Install Keptn using Manifests + +All versions of the Lifecycle Toolkit can be installed using manifests, +with a command like the following: + + + +```shell +kubectl apply -f https://github.com/keptn/lifecycle-toolkit/releases/download/v0.8.1/manifest.yaml +kubectl wait --for=condition=Available deployment/lifecycle-operator -n keptn-lifecycle-toolkit-system --timeout=120s +``` + + + +The Lifecycle Toolkit and its dependencies are now installed and ready to use. + +