-
Notifications
You must be signed in to change notification settings - Fork 165
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
EVEREST-1511 | Everest Helm chart #383
Merged
Merged
Changes from all commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
ff43d0d
Add Everest Helm chart
mayankshah1607 5feedfb
Update README
mayankshah1607 3cc9105
Skip automated release for everest
mayankshah1607 d776779
Refinements
mayankshah1607 a64b82e
More fixes
mayankshah1607 de8e705
More changes
mayankshah1607 2c5d2c2
Refactor using subcharts
mayankshah1607 3ab51e6
More changes
mayankshah1607 76c140a
Fix OG
mayankshah1607 767664d
More refactoring!
mayankshah1607 47897d5
Fix labeller
mayankshah1607 99f9224
More refactor
mayankshah1607 a7174fc
Renaming
mayankshah1607 d73bf60
Fix Makefile
mayankshah1607 474bced
More refactoring
mayankshah1607 13a0709
Refactor into subcharts again
mayankshah1607 e71a313
More changes
mayankshah1607 1d3be06
More fixes
mayankshah1607 d30dff3
Typo
mayankshah1607 e6eb44f
Add docs script
mayankshah1607 61ebc46
Fix docs
mayankshah1607 258aea9
Merge branch 'main' into EVEREST-1511
mayankshah1607 c5fb62b
Fix tls, add cert-manager support
mayankshah1607 cd4f678
works!
mayankshah1607 e4faddb
Fix docs
mayankshah1607 675ef47
Update readme
mayankshah1607 9b26cd4
Typos
mayankshah1607 639c651
Linting
mayankshah1607 b32086a
Merge branch 'main' into EVEREST-1511
mayankshah1607 c467865
Linting
mayankshah1607 8a0071b
Fix tmpl
mayankshah1607 91ededc
Add maintainer
mayankshah1607 ee24fa9
Remove kubeVersion
mayankshah1607 f3ce5d4
Exclude everest chart
mayankshah1607 60c2f27
Wire up cleanup job
mayankshah1607 fbbac37
Fix
mayankshah1607 28508db
Add flags to make secrets optional
mayankshah1607 3e434c4
Fix CI
mayankshah1607 32ec86b
Typo
mayankshah1607 a9c18f5
Just exclude for now
mayankshah1607 c23bb11
update codeowners and maintainers
mayankshah1607 a291476
Add tech preview banner
mayankshah1607 bd09765
gen docs
mayankshah1607 335036e
Update banner
mayankshah1607 c20a9fe
Remove unused options
mayankshah1607 bfc66e8
Update docs
mayankshah1607 2f6478b
Add OIDC settings
mayankshah1607 c81edb7
Update readme
mayankshah1607 32ecb81
Use lookup
mayankshah1607 5dab2de
Openshift support
mayankshah1607 4517e64
Docs gen
mayankshah1607 624af73
Merge branch 'main' into EVEREST-1511
mayankshah1607 888aaea
Fixes
mayankshah1607 1c119fa
Fix makefile
mayankshah1607 319d664
More fixes
mayankshah1607 e842bbf
Add kubeVersion
mayankshah1607 6a382c8
Fix Makefile
mayankshah1607 171d7a2
Update deps
mayankshah1607 e09fbdb
Fix Makefile
mayankshah1607 f2b341a
Fix kubeVersion
mayankshah1607 323ba4a
Fix linebreaks
mayankshah1607 9600af1
Update deps
mayankshah1607 080a1b7
Fix secrets
mayankshah1607 a747a3c
Include Everest for tests
mayankshah1607 06c7f7a
Remove openshift support
mayankshah1607 cc6b653
Fix OLM certs being overwritten
mayankshah1607 3e1a043
Merge branch 'main' into EVEREST-1511
mayankshah1607 f724985
Update .github/CODEOWNERS
mayankshah1607 a642c2c
Merge branch 'main' into EVEREST-1511
mayankshah1607 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
* @hors @tplavcic @nmarukovich @ptankov @jvpasinatto @eleo007 | ||
/charts/pmm/ @percona/pmm-review-be @spron-in | ||
/charts/everest/ @percona/everest-backend-devs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
push: | ||
path-ignore: | ||
- 'charts/gcp-marketplace/**' | ||
- 'charts/everest/**' | ||
branches: | ||
- main | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.deploy/ | ||
.idea/ | ||
*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# 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 | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ | ||
|
||
Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
dependencies: | ||
- name: common | ||
repository: file://charts/common | ||
version: 0.0.1 | ||
- name: everest-db-namespace | ||
repository: file://charts/everest-db-namespace | ||
version: 0.0.0 | ||
digest: sha256:c41bc5832c4bf3829a3ceabb7b3fcd2461035cc66986aa0acea8e7b366a6e036 | ||
generated: "2024-10-21T20:53:46.621274+05:30" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: v2 | ||
name: everest | ||
description: A cloud-native database platform | ||
version: 0.0.0 | ||
appVersion: 0.0.0 | ||
type: application | ||
kubeVersion: '>= 1.27.0' | ||
maintainers: | ||
- name: mayankshah1607 | ||
email: [email protected] | ||
- name: oksana-grishchenko | ||
email: [email protected] | ||
- name: recharte | ||
email: [email protected] | ||
- name: michal-kralik | ||
email: [email protected] | ||
dependencies: | ||
- name: common | ||
version: 0.0.1 | ||
repository: "file://charts/common" | ||
# This is not really a dependency, but we define it as one so that we're | ||
# able to conditionally disable rendering these manifests along with the core chart manifests. | ||
# The default behaviour of Helm is to always include the sub-chart manfiests unless explicitly disabled. | ||
- name: everest-db-namespace | ||
version: 0.0.0 | ||
repository: "file://charts/everest-db-namespace" | ||
condition: "everest-db-namespace.enabled" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
prepare-chart: | ||
CHART_FILES="Chart.yaml ./charts/everest-db-namespace/Chart.yaml"; \ | ||
for chart in $$CHART_FILES; do \ | ||
yq eval -i '.version = "${VERSION}"' $$chart; \ | ||
yq eval -i '.appVersion = "${VERSION}"' $$chart; \ | ||
done | ||
yq eval -i '.server.image = "$(IMAGE_PREFIX)/everest"' values.yaml | ||
yq eval -i '.olm.catalogSourceImage = "$(IMAGE_PREFIX)/everest-catalog"' values.yaml | ||
yq eval -i '.operator.image = "$(IMAGE_PREFIX)/everest-operator"' values.yaml | ||
yq eval -i '(.dependencies[] | select(.name == "everest-db-namespace")).version = "${VERSION}"' Chart.yaml | ||
|
||
|
||
release: IMAGE_PREFIX=percona | ||
release: prepare-chart | ||
|
||
release-dev: IMAGE_PREFIX=perconalab | ||
release-dev: prepare-chart | ||
|
||
docs-gen: | ||
docker run --rm -v "$(PWD)/:/helm-docs" -u $(shell id -u) jnorwood/helm-docs:v1.9.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Percona Everest | ||
|
||
This helm chart deploys Percona Everest. | ||
|
||
Useful links: | ||
- [Percona Everest Documentation](https://docs.percona.com/everest/index.html) | ||
- [Percona Everest GitHub](https://github.com/percona/everest) | ||
|
||
> :warning: Note: This chart is currently in technical preview. | ||
Future releases could potentially introduce breaking changes, and we cannot promise a migration path. We do not recommend using this in production environment, | ||
but if you do so, please be aware of the risks. | ||
|
||
## Usage | ||
|
||
### Deploy Percona Everest | ||
|
||
```sh | ||
helm repo add percona https://percona.github.io/percona-helm-charts/ | ||
helm install everest-core percona/everest --namespace everest-system --create-namespace | ||
``` | ||
|
||
> Note: we currently do not support deploying Everest in a namespace other than `everest-system`. | ||
|
||
This command may take a few minutes to complete. Once done, you can retrieve the admin credentials using the following command: | ||
|
||
```sh | ||
kubectl get secret everest-accounts -n everest-system -o jsonpath='{.data.users\.yaml}' | base64 --decode | yq '.admin.passwordHash' | ||
``` | ||
|
||
### Deploy your database namespace components | ||
|
||
Once Everest is running, we need to create a namespace for your databases and provision the necessary operators. | ||
|
||
```sh | ||
cat <<EOF | kubectl create -f - | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: everest | ||
labels: | ||
app.kubernetes.io/managed-by: everest | ||
EOF | ||
helm install everest percona/everest-db-namespace --namespace everest | ||
``` | ||
|
||
### Uninstalling | ||
|
||
As a first step, you must always clean up your database namespace(s) first, otherwise the deletion could get stuck. | ||
```sh | ||
helm uninstall everest -n everest | ||
kubectl delete ns everest | ||
``` | ||
|
||
Then you can uninstall Everest itself: | ||
```sh | ||
helm uninstall everest-core -n everest-system | ||
kubectl delete ns everest-system | ||
``` | ||
|
||
## Configuration | ||
|
||
The following table shows the configurable parameters of the Percona Everest chart and their default values. | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| everest-db-namespace.enabled | bool | `false` | Do not enable. | | ||
| monitoring.namespace | string | `"everest-monitoring"` | Namespace where monitoring is installed. Do no change unless you know what you are doing. | | ||
| namespaceOverride | string | `""` | Namespace override. Defaults to the value of .Release.Namespace. | | ||
| olm.catalogSourceImage | string | `"perconalab/everest-catalog"` | Image to use for Everest CatalogSource. | | ||
| olm.image | string | `"quay.io/operator-framework/olm@sha256:1b6002156f568d722c29138575733591037c24b4bfabc67946f268ce4752c3e6"` | Image to use for the OLM components. | | ||
| olm.namespace | string | `"everest-olm"` | Namespace where OLM is installed. Do no change unless you know what you are doing. | | ||
| olm.packageserver.tls.caCert | string | `""` | CA certificate for the PackageServer APIService. Overrides the tls.type setting. | | ||
| olm.packageserver.tls.tlsCert | string | `""` | Client certificate for the PackageServer APIService. Overrides the tls.type setting. | | ||
| olm.packageserver.tls.tlsKey | string | `""` | Client key for the PackageServer APIService. Overrides the tls.type setting. | | ||
| olm.packageserver.tls.type | string | `"helm"` | Type of TLS certificates. Supported values are "helm" and "cert-manager". For production setup, it is recommended to use "cert-manager". | | ||
| operator.enableLeaderElection | bool | `true` | Enable leader election for the operator. | | ||
| operator.healthProbeAddr | string | `":8081"` | Health probe address for the operator. | | ||
| operator.image | string | `"perconalab/everest-operator"` | Image to use for the Everest operator container. | | ||
| operator.metricsAddr | string | `"127.0.0.1:8080"` | Metrics address for the operator. | | ||
| operator.resources | object | `{"limits":{"cpu":"500m","memory":"128Mi"},"requests":{"cpu":"5m","memory":"64Mi"}}` | Resources to allocate for the operator container. | | ||
| server.image | string | `"perconalab/everest"` | Image to use for the server container. | | ||
| server.oidc | object | `{}` | OIDC configuration for Everest. | | ||
| server.rbac | string | `"g, admin, role:admin\n"` | RBAC policy for Everest. | | ||
| server.resources | object | `{"limits":{"cpu":"200m","memory":"500Mi"},"requests":{"cpu":"100m","memory":"20Mi"}}` | Resources to allocate for the server container. | | ||
| telemetry | bool | `true` | If set, enabled sending telemetry information. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Percona Everest | ||
|
||
This helm chart deploys Percona Everest. | ||
|
||
Useful links: | ||
- [Percona Everest Documentation](https://docs.percona.com/everest/index.html) | ||
- [Percona Everest GitHub](https://github.com/percona/everest) | ||
|
||
> :warning: Note: This chart is currently in technical preview. | ||
Future releases could potentially introduce breaking changes, and we cannot promise a migration path. We do not recommend using this in production environment, | ||
but if you do so, please be aware of the risks. | ||
|
||
## Usage | ||
|
||
### Deploy Percona Everest | ||
|
||
```sh | ||
helm repo add percona https://percona.github.io/percona-helm-charts/ | ||
helm install everest-core percona/everest --namespace everest-system --create-namespace | ||
``` | ||
|
||
> Note: we currently do not support deploying Everest in a namespace other than `everest-system`. | ||
|
||
This command may take a few minutes to complete. Once done, you can retrieve the admin credentials using the following command: | ||
|
||
```sh | ||
kubectl get secret everest-accounts -n everest-system -o jsonpath='{.data.users\.yaml}' | base64 --decode | yq '.admin.passwordHash' | ||
``` | ||
|
||
### Deploy your database namespace components | ||
|
||
Once Everest is running, we need to create a namespace for your databases and provision the necessary operators. | ||
|
||
```sh | ||
cat <<EOF | kubectl create -f - | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: everest | ||
labels: | ||
app.kubernetes.io/managed-by: everest | ||
EOF | ||
helm install everest percona/everest-db-namespace --namespace everest | ||
``` | ||
|
||
### Uninstalling | ||
|
||
As a first step, you must always clean up your database namespace(s) first, otherwise the deletion could get stuck. | ||
```sh | ||
helm uninstall everest -n everest | ||
kubectl delete ns everest | ||
``` | ||
|
||
Then you can uninstall Everest itself: | ||
```sh | ||
helm uninstall everest-core -n everest-system | ||
kubectl delete ns everest-system | ||
``` | ||
|
||
## Configuration | ||
|
||
The following table shows the configurable parameters of the Percona Everest chart and their default values. | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
{{- range .Values }} | ||
| {{ .Key }} | {{ .Type }} | {{ .Default }} | {{ .AutoDescription }} | | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 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 | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v2 | ||
name: common | ||
description: A library chart for Everest containing common resources. | ||
type: library | ||
version: 0.0.1 | ||
appVersion: "0.0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# common | ||
|
||
![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: 0.0.1](https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square) | ||
|
||
A library chart for Everest containing common resources. | ||
|
||
---------------------------------------------- | ||
Autogenerated from chart metadata using [helm-docs v1.9.1](https://github.com/norwoodj/helm-docs/releases/v1.9.1) |
71 changes: 71 additions & 0 deletions
71
charts/everest/charts/common/templates/_csv_cleanup.yaml.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# | ||
# @param .namespace The namespace where the operator is installed | ||
# | ||
{{- define "everest.csvCleanup" }} | ||
{{- $hookName := printf "everest-helm-pre-delete-hook" }} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ $hookName }} | ||
namespace: {{ .namespace }} | ||
annotations: | ||
"helm.sh/hook-delete-policy": hook-succeeded | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: {{ $hookName }} | ||
namespace: {{ .namespace }} | ||
annotations: | ||
"helm.sh/hook-delete-policy": hook-succeeded | ||
rules: | ||
- apiGroups: | ||
- operators.coreos.com | ||
resources: | ||
- clusterserviceversions | ||
verbs: | ||
- delete | ||
- list | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: {{ $hookName }} | ||
namespace: {{ .namespace }} | ||
annotations: | ||
"helm.sh/hook-delete-policy": hook-succeeded | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: {{ $hookName }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ $hookName }} | ||
namespace: {{ .namespace }} | ||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: {{ $hookName }}-{{ randNumeric 6 }} | ||
namespace: {{ .namespace }} | ||
annotations: | ||
"helm.sh/hook": pre-delete | ||
"helm.sh/hook-delete-policy": hook-succeeded | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- image: bitnami/kubectl:latest | ||
name: {{ $hookName }} | ||
command: | ||
- /bin/sh | ||
- -c | ||
- | | ||
kubectl delete csv -n {{ .namespace }} --all --wait | ||
dnsPolicy: ClusterFirst | ||
restartPolicy: OnFailure | ||
serviceAccount: {{ $hookName }} | ||
serviceAccountName: {{ $hookName }} | ||
terminationGracePeriodSeconds: 30 | ||
--- | ||
{{- end }} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to exclude it for now because this tool tries to deploy in a random namespace, but the chart fails if it is anything other than
everest-system
At the same time, I could not figure out how to set a namespace only for specific charts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe there can be a separate workflow for everest, since we'll need one anyway for running a manual release