Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init vendir #2

Merged
merged 3 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .abs/main.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
replace-chart-version-with-git: true
generate-metadata: true
chart-dir: ./helm/keda-app
chart-dir: ./helm/keda
destination: ./build
62 changes: 57 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,64 @@ workflows:
jobs:
- 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-app chart"
app_catalog: "giantswarm-playground-catalog"
app_catalog_test: "giantswarm-playground-test-catalog"
chart: "keda-app"
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: "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 content 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`
22 changes: 22 additions & 0 deletions helm/keda/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
23 changes: 23 additions & 0 deletions helm/keda/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
annotations:
application.giantswarm.io/team: turtles
ui.giantswarm.io/logo: https://raw.githubusercontent.com/kedacore/keda/main/images/keda-logo-500x500-white.png
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:
- https://github.com/kedacore/keda
21 changes: 21 additions & 0 deletions helm/keda/Notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Get started by deploying Scaled Objects to your cluster:
- Information about Scaled Objects : https://keda.sh/docs/latest/concepts/
- Samples: https://github.com/kedacore/samples

Get information about the deployed ScaledObjects:
kubectl get scaledobject [--namespace <namespace>]

Get details about a deployed ScaledObject:
kubectl describe scaledobject <scaled-object-name> [--namespace <namespace>]

Get information about the deployed ScaledObjects:
kubectl get triggerauthentication [--namespace <namespace>]

Get details about a deployed ScaledObject:
kubectl describe triggerauthentication <trigger-authentication-name> [--namespace <namespace>]

Get an overview of the Horizontal Pod Autoscalers (HPA) that KEDA is using behind the scenes:
kubectl get hpa [--all-namespaces] [--namespace <namespace>]

For more information on running KEDA, visit:
https://github.com/kedacore/keda/
Loading