Skip to content

Commit

Permalink
fix retag
Browse files Browse the repository at this point in the history
Signed-off-by: QuentinBisson <[email protected]>
  • Loading branch information
QuentinBisson committed Nov 6, 2023
1 parent 72add61 commit 827899d
Show file tree
Hide file tree
Showing 18 changed files with 1,625 additions and 353 deletions.
54 changes: 53 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,66 @@ orbs:
workflows:
package-and-push-chart-on-tag:
jobs:
- architect/push-to-app-catalog:
context: "architect"
executor: "app-build-suite"
name: "push to default-catalog"
app_catalog: "default-catalog"
app_catalog_test: "default-test-catalog"
chart: "keda"
# Trigger job on git tag.
filters:
tags:
only: /^v.*/

- architect/push-to-app-catalog:
context: "architect"
executor: "app-build-suite" # uncomment this if you want automatic metadata generation and helm chart linting
name: "package and push keda chart"
name: "push to giantswarm-catalog"
app_catalog: "giantswarm-catalog"
app_catalog_test: "giantswarm-test-catalog"
chart: "keda"
# Trigger job on git tag.
filters:
tags:
only: /^v.*/

- architect/push-to-app-catalog:
context: "architect"
executor: "app-build-suite" # uncomment this if you want automatic metadata generation and helm chart linting
name: "push to control-plane-catalog"
app_catalog: "control-plane-catalog"
app_catalog_test: "control-plane-test-catalog"
chart: "keda"
# Trigger job on git tag.
filters:
tags:
only: /^v.*/

- architect/push-to-app-collection:
context: "architect"
name: aws-app-collection
app_name: "keda"
app_namespace: "kube-system"
app_collection_repo: "aws-app-collection"
requires:
- "push to control-plane-catalog"
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/

- architect/push-to-app-collection:
context: "architect"
name: azure-app-collection
app_name: "keda"
app_namespace: "kube-system"
app_collection_repo: "azure-app-collection"
requires:
- "push to control-plane-catalog"
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- changed: `app.giantswarm.io` label group was changed to `application.giantswarm.io`
- Create first app iteration.

[Unreleased]: https://github.com/giantswarm/keda-app/tree/main
87 changes: 39 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,61 @@
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/giantswarm/keda-app/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/giantswarm/keda-app/tree/main)
[![CircleCI](https://circleci.com/gh/giantswarm/keda-app.svg?style=shield)](https://circleci.com/gh/giantswarm/keda-app)

[Read me after cloning this template (GS staff only)](https://handbook.giantswarm.io/docs/dev-and-releng/app-developer-processes/adding_app_to_appcatalog/)
# keda chart

# keda-app chart

Giant Swarm offers a keda-app App which can be installed in workload clusters.
Here we define the keda-app chart with its templates and default configuration.

**What is this app?**

**Why did we add it?**

**Who can use it?**
Giant Swarm offers a keda App which can be installed in workload clusters.

## Installing

There are several ways to install this app onto a workload cluster.

- [Using GitOps to instantiate the App](https://docs.giantswarm.io/advanced/gitops/apps/)
- [Using our web interface](https://docs.giantswarm.io/platform-overview/web-interface/app-platform/#installing-an-app).
- By creating an [App resource](https://docs.giantswarm.io/use-the-api/management-api/crd/apps.application.giantswarm.io/) in the management cluster as explained in [Getting started with App Platform](https://docs.giantswarm.io/getting-started/app-platform/).

## Configuring

### values.yaml

**This is an example of a values file you could upload using our web interface.**

```yaml
# values.yaml

```

### Sample App CR and ConfigMap for the management cluster
- [Using our web interface](https://docs.giantswarm.io/ui-api/web/app-platform/#installing-an-app).
- By creating an [App resource](https://docs.giantswarm.io/ui-api/management-api/crd/apps.application.giantswarm.io/) in the management cluster as explained in [Getting started with App Platform](https://docs.giantswarm.io/app-platform/getting-started/).

If you have access to the Kubernetes API on the management cluster, you could create
the App CR and ConfigMap directly.
## Upgrading keda version

Here is an example that would install the app to
workload cluster `abc12`:
The contents of the `helm` folder are being generated by the `make` target called `make update-chart`.

```yaml
# appCR.yaml
This target uses [`vendir`](https://carvel.dev/vendir/) to fetch the helm chart contained in [the fork of the keda repository that we maintain](https://github.com/giantswarm/keda-upstream).
Currently, the state is the following:
- the `main` branch on the fork contains latest upstream release `v2.12.x`, with our custom changes on top unreleased yet (TO BE 2.x).
- the `giantswarm/v2.11.x` branch contains latest upstream release `v2.11.x`, with our custom changes on top unreleased yet (TO BE 1.x).
- the `giantswarm/v2.10.x` branch contains latest upstream release `v2.10.x`, with our custom changes on top released in keda-app 0.x.

```
### Major or minor version upgrade

```yaml
# user-values-configmap.yaml
If you want to upgrade this keda-app to use a newer version of keda, you need to prepare our fork first.

```
In `keda-upstream`:

See our [full reference on how to configure apps](https://docs.giantswarm.io/getting-started/app-platform/app-configuration/) for more details.
1. You need to create a new branch for the previous version (e.g. `giantswarm/v2.12.x` for upstream release `v2.12.x` using `git checkout v2.12.x -b giantswarm/v2.12.x`) and then `cherry-pick` our changes from `main` into it or create the release branch from main (`git checkout main -b giantswarm/v2.12.x`)
2. Update the `main branch` to reflect latest upstream changes (sync fork should suffice).
3. Apply our custom changes on top of that new branch. You can use `cherry-pick` for that.

## Compatibility
In `keda-app`:

This app has been tested to work with the following workload cluster release versions:
4. Run the make target `APPLICATION=keda make update-chart && helm-docs helm/keda`
5. Update schema: `helm schema-gen helm/keda/values.yaml > helm/keda/values.schema.json`
6. Create a new pull request in `keda-app` with the generated changes.
If you need further customizations, you can keep adding commits on the new `keda-upstream` branch, and re-run `APPLICATION=keda make update-chart && helm-docs helm/keda` to update the generated files.
Do not forget to review this README.
7. Merge the changes in `keda-app` once you're happy with the changes and you've tested it works in a workload cluster.
8. Release a new major version of our `keda app`

- _add release version_
### Patch version upgrade

## Limitations
If you want to upgrade this keda-app to use a newer version of keda, you need to prepare our fork first.

Some apps have restrictions on how they can be deployed.
Not following these limitations will most likely result in a broken deployment.
In `keda-upstream`:

- _add limitation_
1. Go the the branch of the version you want to patch (e.g. `giantswarm/v2.10.x`).
2. Fetch latest tags from upstream: `git fetch --tags upstream` with upstream pointing to the upstream keda repository
3. Rebase the upstream tag (`git rebase -i <tag>`)

## Credit
In `keda-app`:

- {APP HELM REPOSITORY}
4. Run the make target `APPLICATION=keda make update-chart && helm-docs helm/keda` in the correct release branch (`0.x for keda 2.10`)
5. Update schema: `helm schema-gen helm/keda/values.yaml > helm/keda/values.schema.json`
6. Create a new pull request in `keda-app` with the generated changes.
If you need further customizations, you can keep adding commits on the new `keda-upstream` branch, and re-run `APPLICATION=keda make update-chart && helm-docs helm/keda` to update the generated files.
7. Merge the changes in `keda-app` once you're happy with the changes and you've tested it works in a workload cluster.
8. Release a new major version of our `keda app`
10 changes: 10 additions & 0 deletions helm/keda/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,19 @@ annotations:
apiVersion: v2
name: keda
description: Event-based autoscaler for workloads on Kubernetes

# Specify the Kubernetes version range that we support.
# We allow pre-release versions for cloud-specific Kubernetes versions such as v1.21.5-gke.1302 or v1.18.9-eks-d1db3c
kubeVersion: ">=v1.24.0-0"

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 2.10.1

home: https://github.com/giantswarm/keda-app
icon: https://raw.githubusercontent.com/kedacore/keda/main/images/keda-logo-500x500-white.png
sources:
Expand Down
Loading

0 comments on commit 827899d

Please sign in to comment.