Skip to content

Commit

Permalink
docs: add section about "OpenShift" in the documentation
Browse files Browse the repository at this point in the history
Cover installation of the operator via the web console and the `oc`
command-line interface (CLI), as well as some important OpenShift topics like
RBAC policies, operator groups, subscriptions, cluster roles, service accounts,
and so on.

Co-authored-by: Jonathan Gonzalez V <jonathan.gonzalez@enterprisedb.com>
Co-authored-by: Adam Wright <adam.wright@enterprisedb.com>
Co-authored-by: John Long <john.long@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
  • Loading branch information
6 people authored Feb 16, 2022
1 parent 4cd2f10 commit 77dc312
Show file tree
Hide file tree
Showing 20 changed files with 779 additions and 50 deletions.
36 changes: 35 additions & 1 deletion .wordlist-en-custom.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ CRC
CRD
CRDs
CSV
CSVs
Canovai
Cecchi
CertificatesConfiguration
Expand All @@ -47,14 +48,17 @@ ClientCertsCASecret
ClientReplicationSecret
ClusterCondition
ClusterConditionType
ConditionStatus
ClusterIP
ClusterList
ClusterRole
ClusterRole's
ClusterServiceVersion
ClusterSpec
ClusterStatus
CodeReady
ColumnName
CompressionType
ConditionStatus
ConfigMap
ConfigMapKeySelector
ConfigMapResourceVersion
Expand All @@ -66,6 +70,7 @@ CronJobs
CustomResourceDefinition
CustomResourceDefinitions
Customizations
DDTHH
DISA
DNS
DataBackupConfiguration
Expand Down Expand Up @@ -151,6 +156,7 @@ ObjectMeta
OnlineUpdateEnabled
OpenShift
Openshift
OperatorGroup
OperatorHub
PGAudit
PGDATA
Expand Down Expand Up @@ -220,6 +226,7 @@ SELinux
SHA
SQLQuery
SSL
SSZ
STORAGEACCOUNTNAME
ScheduledBackup
ScheduledBackupList
Expand All @@ -235,6 +242,7 @@ Seealso
ServerCASecret
ServerTLSSecret
ServiceAccount
ServiceAccount's
ServiceMonitor
Silvela
StorageClass
Expand All @@ -258,7 +266,9 @@ WALs
Wadle
WalBackupConfiguration
YXBw
YY
YYYY
abd
accessKeyId
accessModes
adc
Expand All @@ -267,12 +277,15 @@ addons
affinityconfiguration
aks
albert
allnamespaces
alloc
allocator
allowPrivilegeEscalation
allowVolumeExpansion
angus
api
apiGroup
apiGroups
apiVersion
apidoc
apis
Expand Down Expand Up @@ -320,6 +333,7 @@ ce
cheatsheet
checksums
chmod
cioni
cisecurity
claimRef
clair
Expand All @@ -329,6 +343,7 @@ clientCASecret
clusterBackup
clusterName
clusterlist
clusterrole
clusterspec
clusterstatus
cmd
Expand Down Expand Up @@ -357,13 +372,16 @@ coverity
cp
cpu
crc
crds
crdview
createuser
creationTimestamp
creds
cron
crt
cryptographic
csvlog
csvs
ctl
currentPrimary
customQueriesConfigMap
Expand All @@ -379,12 +397,14 @@ datacenters
datallowconn
datistemplate
datname
dbe
dbname
ddl
de
declaratively
defaultMode
defaultPoolSize
deployer
destinationPath
dev
devel
Expand Down Expand Up @@ -412,6 +432,7 @@ externalClusters
facto
failover
fastpath
fb
fd
ffd
filesystem
Expand Down Expand Up @@ -496,6 +517,7 @@ lsn
lt
malcolm
mallocs
mario
matchExpressions
matchLabels
maxClientConnections
Expand All @@ -518,6 +540,7 @@ monitoringconfiguration
mountPath
msg
mspan
multinamespace
myAKSCluster
myResourceGroup
namespace
Expand Down Expand Up @@ -545,8 +568,12 @@ ol
olm
openshift
operatorframework
operatorgorup
operatorgroup
operatorgroups
operatorhub
osdk
packagemanifests
parseable
passwd
pc
Expand Down Expand Up @@ -593,6 +620,7 @@ prepended
primaryUpdateStrategy
proc
programmatically
proj
prometheus
provisioner
psql
Expand Down Expand Up @@ -623,6 +651,7 @@ resourcerequirements
retentionPolicy
reusePVC
robfig
roleRef
rollingupdatestatus
rollout
runonserver
Expand All @@ -649,12 +678,15 @@ securityContext
serverCASecret
serverName
serverTLSSecret
serviceaccount
sha
shm
shmall
shmmax
sig
sigs
singlenamespace
sourceNamespace
specificities
sql
src
Expand Down Expand Up @@ -701,6 +733,7 @@ tablespaces
targetImmediate
targetLSN
targetName
targetNamespaces
targetPort
targetPrimary
targetTLI
Expand Down Expand Up @@ -736,6 +769,7 @@ walSegmentSize
walbackupconfiguration
walkthrough
walsender
webconsole
webhook
webhooks
webtest
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,14 @@ shellcheck: ## Shellcheck for the hack directory.
spellcheck: ## Runs the spellcheck on the project.
docker run --rm -v $(PWD):/tmp jonasbn/github-action-spellcheck:0.14.0

woke: # Runs the woke checks on project.
woke: ## Runs the woke checks on project.
docker run --rm -v $(PWD):/src -w /src getwoke/woke:0.9 woke -c .woke.yaml

checks: generate manifests apidoc fmt spellcheck woke vet lint ## Runs all the checks on the project.
wordlist-ordered: ## Order the wordlist using sort
LANG=C sort .wordlist-en-custom.txt > .wordlist-en-custom.txt.new && \
mv -f .wordlist-en-custom.txt.new .wordlist-en-custom.txt

checks: generate manifests apidoc fmt spellcheck wordlist-ordered woke vet lint ## Runs all the checks on the project.

##@ Documentation

Expand Down
1 change: 1 addition & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ nav:
- kubernetes_upgrade.md
- expose_pg_services.md
- cnp-plugin.md
- openshift.md
- troubleshooting.md
- e2e.md
- container_images.md
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/openshift/openshift-rbac.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/openshift/operatorhub_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/images/openshift/operatorhub_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ Cloud Native PostgreSQL works with PostgreSQL and is available under the
Cloud Native PostgreSQL requires Kubernetes 1.19 or higher.

Cloud Native PostgreSQL has also been certified for
[RedHat OpenShift Container Platform (OCP)](https://www.openshift.com/products/container-platform)
4.6+ and is available directly from the [RedHat Catalog](https://catalog.redhat.com/).
[Red Hat OpenShift Container Platform (OCP)](https://www.openshift.com/products/container-platform)
4.6+ and is available directly from the [Red Hat Catalog](https://catalog.redhat.com/).
OpenShift Container Platform is an open-source distribution of Kubernetes which is
[maintained and commercially supported](https://access.redhat.com/support/policy/updates/openshift#ocp4)
by Red Hat.

!!! Important
Please take into account that some delay may occur when releasing Cloud
Native PostgreSQL on RedHat's OpenShift Container Platform, as the process is
Native PostgreSQL on Red Hat's OpenShift Container Platform, as the process is
not entirely under our control.

Please refer to the
Expand Down
43 changes: 5 additions & 38 deletions docs/src/installation_upgrade.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Installation and upgrades

!!! Seealso "OpenShift"
For instructions on how to install Cloud Native PostgreSQL on Red Hat
OpenShift Container Platform, please refer to the ["OpenShift"](openshift.md)
section.

## Installation on Kubernetes

### Directly using the operator manifest
Expand Down Expand Up @@ -37,41 +42,6 @@ from the [OperatorHub.io website](https://operatorhub.io), following the install

The operator can be installed using the provided [Helm chart](https://github.com/EnterpriseDB/cloud-native-postgresql-helm).

## Installation on Openshift

### Via the web interface

Log in to the console as `kubeadmin` and navigate to the `Operator → OperatorHub` page.

Find the `Cloud Native PostgreSQL` box scrolling or using the search filter.

Select the operator and click `Install`. Click `Install` again in the following
`Install Operator`, using the default settings. For an in-depth explanation of
those settings, see the [Openshift documentation](https://docs.openshift.com/container-platform/4.6/operators/admin/olm-adding-operators-to-cluster.html#olm-installing-from-operatorhub-using-web-console_olm-adding-operators-to-a-cluster).

The operator will soon be available in all the namespaces.

Depending on the security levels applied to the OpenShift cluster you may be
required to create a proper set of roles and permissions for the operator to
be used in different namespaces.
For more information on this matter see the
[Openshift documentation](https://docs.openshift.com/container-platform/4.6/operators/understanding/olm/olm-understanding-operatorgroups.html).

### Via the `oc` command line

You can add the [`subscription`](samples/subscription.yaml) to install the operator in all the namespaces
as follows:

```sh
oc apply -f \
https://docs.enterprisedb.io/cloud-native-postgresql/latest/samples/subscription.yaml
```

The operator will soon be available in all the namespaces.

More information on
[how to install operators via CLI](https://docs.openshift.com/container-platform/4.6/operators/admin/olm-adding-operators-to-cluster.html#olm-installing-operator-from-operatorhub-using-cli_olm-adding-operators-to-a-cluster)
is available in the Openshift documentation.

## Details about the deployment

Expand All @@ -97,9 +67,6 @@ tolerations to make sure that the operator does not run on the same nodes where
the actual PostgreSQL clusters are running (this might even include the control
plane for self-managed Kubernetes installations).

As far as OpenShift is concerned, details might differ depending on the
selected installation method.

!!! Seealso "Operator configuration"
You can change the default behavior of the operator by overriding
some default options. For more information, please refer to the
Expand Down
Loading

0 comments on commit 77dc312

Please sign in to comment.