Skip to content

Commit

Permalink
revert: remove generation of KLT manifest releases (#1941)
Browse files Browse the repository at this point in the history
  • Loading branch information
mowies committed Aug 24, 2023
1 parent 36b2dff commit 6027314
Show file tree
Hide file tree
Showing 5 changed files with 208 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
143 changes: 143 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions docs/content/en/docs/install/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down
59 changes: 59 additions & 0 deletions docs/content/en/docs/snippets/tasks/install.md
Original file line number Diff line number Diff line change
@@ -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 <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.

<details>
<summary>Install Keptn using Manifests</summary>

All versions of the Lifecycle Toolkit can be installed using manifests,
with a command like the following:

<!---x-release-please-start-version-->

```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
```

<!---x-release-please-end-->

The Lifecycle Toolkit and its dependencies are now installed and ready to use.

</details>

0 comments on commit 6027314

Please sign in to comment.