Skip to content

Commit

Permalink
Merge branch 'main' into K8SPSMDB-1224-psmdb-1190
Browse files Browse the repository at this point in the history
  • Loading branch information
jvpasinatto authored Jan 20, 2025
2 parents ceb6414 + e038d85 commit 7806135
Show file tree
Hide file tree
Showing 16 changed files with 411 additions and 91 deletions.
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,31 @@
[Percona](https://www.percona.com/) is committed to simplify the deployment and management of databases on Kubernetes. [Helm](https://helm.sh/) enables users to package, run, share and manage even complex applications.
This repository contains Helm charts for the following Percona products.

* [Percona Operator for MySQL](charts/pxc-operator/)
* [Percona XtraDB Cluster](charts/pxc-db/)
* [Percona Operator for MongoDB](charts/psmdb-operator/)
* [Percona Server for MongoDB](charts/psmdb-db/)
* [Percona Operator for PostgreSQL](charts/pg-operator/)
* [Percona Distribution for PostgreSQL](charts/pg-db/)
* [Percona Monitoring and Management (PMM)](charts/pmm/)
- [Percona Operator for MySQL](charts/pxc-operator/)
- [Percona XtraDB Cluster](charts/pxc-db/)
- [Percona Operator for MongoDB](charts/psmdb-operator/)
- [Percona Server for MongoDB](charts/psmdb-db/)
- [Percona Operator for PostgreSQL](charts/pg-operator/)
- [Percona Distribution for PostgreSQL](charts/pg-db/)
- [Percona Monitoring and Management (PMM)](charts/pmm/)
- [Percona Everest](charts/everest/)

Useful links:
* [About Percona Kubernetes Operators](https://www.percona.com/software/percona-kubernetes-operators)
* [About Percona Monitoring and Management](https://www.percona.com/software/database-tools/percona-monitoring-and-management)

- [About Percona Kubernetes Operators](https://www.percona.com/software/percona-kubernetes-operators)
- [About Percona Monitoring and Management](https://www.percona.com/software/database-tools/percona-monitoring-and-management)
- [About Percona Everest](https://docs.percona.com/everest/index.html)

## Installing Charts from this Repository

You will need [Helm v3](https://github.com/helm/helm) for the installation. See detailed installation instructions in the README file of each chart.

# Need help?

**Commercial Support** | **Community Support** |
:-: | :-: |
| <br/>Enterprise-grade assistance for your mission-critical database deployments in containers and Kubernetes. Get expert guidance for complex tasks like multi-cloud replication, database migration and building platforms.<br/><br/> | <br/>Connect with our engineers and fellow users for general questions, troubleshooting, and sharing feedback and ideas.<br/><br/> |
| **[Get Percona Support](https://hubs.ly/Q02ZTH8Q0)** | **[Visit our Forum](https://forums.percona.com/)** |
| **Commercial Support** | **Community Support** |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------: |
| <br/>Enterprise-grade assistance for your mission-critical database deployments in containers and Kubernetes. Get expert guidance for complex tasks like multi-cloud replication, database migration and building platforms.<br/><br/> | <br/>Connect with our engineers and fellow users for general questions, troubleshooting, and sharing feedback and ideas.<br/><br/> |
| **[Get Percona Support](https://hubs.ly/Q02ZTH8Q0)** | **[Visit our Forum](https://forums.percona.com/)** |

# Contributing

Expand All @@ -38,9 +41,10 @@ See the [Contribution Guide](CONTRIBUTING.md) for more information.

If you find a bug related to one of these Helm charts, please submit a report to the appropriate project's Jira issue tracker:

* [Percona Operator for MySQL](https://jira.percona.com/projects/K8SPXC)
* [Percona Operator for MongoDB](https://jira.percona.com/projects/K8SPSMDB)
* [Percona Operator for PostgreSQL](https://jira.percona.com/projects/K8SPG)
* [Percona Monitoring and Management](https://jira.percona.com/projects/PMM)
- [Percona Operator for MySQL](https://jira.percona.com/projects/K8SPXC)
- [Percona Operator for MongoDB](https://jira.percona.com/projects/K8SPSMDB)
- [Percona Operator for PostgreSQL](https://jira.percona.com/projects/K8SPG)
- [Percona Monitoring and Management](https://jira.percona.com/projects/PMM)
- [Percona Everest](https://docs.percona.com/everest/contribute.html#submit-a-bug-report-or-feature-request)

Learn more about submitting bugs, new feature ideas, and improvements in the [Contribution Guide](CONTRIBUTING.md).
5 changes: 1 addition & 4 deletions charts/everest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ Useful links:
- [Percona Everest Documentation](https://docs.percona.com/everest/index.html)
- [Percona Everest GitHub](https://github.com/percona/everest)
- [Deploying with ArgoCD](./docs/argocd.md)

> :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.
- [Installing on OpenShift](./docs/openshift.md)

## Usage

Expand Down
5 changes: 1 addition & 4 deletions charts/everest/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ Useful links:
- [Percona Everest Documentation](https://docs.percona.com/everest/index.html)
- [Percona Everest GitHub](https://github.com/percona/everest)
- [Deploying with ArgoCD](./docs/argocd.md)

> :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.
- [Installing on OpenShift](./docs/openshift.md)

## Usage

Expand Down
8 changes: 0 additions & 8 deletions charts/everest/crds/olm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
name: catalogsources.operators.coreos.com
spec:
group: operators.coreos.com
Expand Down Expand Up @@ -260,7 +259,6 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
name: clusterserviceversions.operators.coreos.com
spec:
group: operators.coreos.com
Expand Down Expand Up @@ -5559,7 +5557,6 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
name: installplans.operators.coreos.com
spec:
group: operators.coreos.com
Expand Down Expand Up @@ -5825,7 +5822,6 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
name: olmconfigs.operators.coreos.com
spec:
group: operators.coreos.com
Expand Down Expand Up @@ -5923,7 +5919,6 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
name: operatorconditions.operators.coreos.com
spec:
group: operators.coreos.com
Expand Down Expand Up @@ -6230,7 +6225,6 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
name: operatorgroups.operators.coreos.com
spec:
group: operators.coreos.com
Expand Down Expand Up @@ -6517,7 +6511,6 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
name: operators.operators.coreos.com
spec:
group: operators.coreos.com
Expand Down Expand Up @@ -6656,7 +6649,6 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
name: subscriptions.operators.coreos.com
spec:
group: operators.coreos.com
Expand Down
57 changes: 57 additions & 0 deletions charts/everest/docs/openshift.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Installing Percona Everest on OpenShift

The Percona Everest Helm chart can be installed on OpenShift with some additional configuration steps.

> Note: Support for OpenShift is currently in progress, so it may not work as expected. If you encounter any issues, please report them by creating a new issue [here](https://github.com/percona/everest/issues/new).
## 1. Install Everest

Run the following command to install Everest with OpenShift compatibility enabled:

```sh
helm install everest-core percona/everest \
--namespace everest-system \
--create-namespace \
--set compatibility.openshift=true \
--set dbNamespace.compatibility.openshift=true \
--set kube-state-metrics.securityContext.enabled=false \
--set kube-state-metrics.rbac.create=false
```

## 2. (Optional) Update RBAC for kube-state-metrics

If you're using a chart version older than 1.5.0, you must manually create a `ClusterRoleBinding` for kube-state-metrics. Use the following YAML:

```sh
cat <<EOF | kubectl apply -f -
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: ksm-openshift-cluster-role-binding
roleRef:
kind: "ClusterRole"
apiGroup: "rbac.authorization.k8s.io"
name: kube-state-metrics
subjects:
- kind: "ServiceAccount"
name: kube-state-metrics
namespace: everest-monitoring
EOF
```

> Note: For versions 1.5.0 and above, this `ClusterRoleBinding` is created automatically when you set `compatibility.openshift=true`.
## 3. (Optional) Install additional database namespaces

If you need to add database namespaces, run the following command with OpenShift compatibility enabled:

```
helm install everest \
percona/everest-db-namespace \
--create-namespace \
--namespace everest \
--set compatibility.openshift=true
```

For detailed instructions, refer to the guide linked [here](../README.md), but adjust the installation parameters according to the values specified in this document.

51 changes: 27 additions & 24 deletions charts/everest/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
{{ if .Release.IsInstall }}
Thank you for installing Everest!
{{- if .Release.IsInstall }}
Thank you for installing Everest (v{{ .Chart.AppVersion }})!

Get started by following the below steps:
Follow the steps below to get started:
{{ if not .Values.dbNamespace.enabled }}
PROVISION A NAMESPACE FOR YOUR DATABASES
=========================================

1. Access the Everest UI:
Install a namespace for your databases using the following command:

Setup a port-forward to the Everest service:
helm install everest percona/everest-db-namespace --namespace everest --create-namespace

kubectl port-forward svc/everest 8080:8080 -n everest-system
{{- end }}

Next, open your browser at http://localhost:8080.
RETRIEVE THE INITIAL ADMIN PASSWORD
====================================

2. Retrieve the initial admin password:
Run the following command to fetch the initial admin password:

kubectl get secret everest-accounts -n everest-system -o jsonpath='{.data.users\.yaml}' | base64 --decode | yq '.admin.passwordHash'
kubectl get secret everest-accounts -n everest-system -o jsonpath='{.data.users\.yaml}' | base64 --decode | yq '.admin.passwordHash'

{{if (not .Values.dbNamespace.enabled) }}
3. Provision a namespace for your databases:
**Note:** The initial password is stored in plain text. For security, change it immediately using the following command:

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
{{ end }}
{{ end }}
{{ if .Release.IsUpgrade }}
everestctl accounts set-password -u admin

ACCESS THE EVEREST UI
======================

To access the web UI, set up port-forwarding and visit http://localhost:8080 in your browser:

kubectl port-forward svc/everest 8080:8080 -n everest-system
{{- end }}

{{- if .Release.IsUpgrade }}
Everest has been successfully upgraded to version {{ .Chart.AppVersion }}!
{{ end }}
{{- end }}

17 changes: 17 additions & 0 deletions charts/everest/templates/ksm-openshift-clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# We need a separate ClusterRoleBinding for OpenShift, as the one that comes pre-installed cannot be bound to the ServiceAccount used
# for Everest's kube-state-metrics installation.
{{- $ksm := (index .Values "kube-state-metrics") -}}
{{- if (and $ksm.enabled .Values.compatibility.openshift )}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: ksm-openshift-cluster-role-binding
roleRef:
kind: "ClusterRole"
apiGroup: "rbac.authorization.k8s.io"
name: kube-state-metrics
subjects:
- kind: "ServiceAccount"
name: kube-state-metrics
namespace: {{ $ksm.namespaceOverride }}
{{- end -}}
Empty file removed charts/everest/test.yaml
Empty file.
8 changes: 4 additions & 4 deletions charts/pxc-db/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: v2
appVersion: 1.15.1
appVersion: 1.16.1
description: A Helm chart for installing Percona XtraDB Cluster Databases using the PXC Operator.
name: pxc-db
home: https://www.percona.com/doc/kubernetes-operator-for-pxc/kubernetes.html
version: 1.15.1
version: 1.16.1
maintainers:
- name: tplavcic
email: [email protected]
- name: spron-in
email: [email protected]
- name: nmarukovich
email: [email protected]
- name: jvpasinatto
email: [email protected]
icon: https://artifacthub.io/image/0b8875cd-6661-4269-9cf6-0fd92d59017b@1x
Loading

0 comments on commit 7806135

Please sign in to comment.