-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into K8SPSMDB-1224-psmdb-1190
- Loading branch information
Showing
16 changed files
with
411 additions
and
91 deletions.
There are no files selected for viewing
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
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
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,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. | ||
|
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,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
17
charts/everest/templates/ksm-openshift-clusterrolebinding.yaml
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,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.
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,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 |
Oops, something went wrong.