Skip to content

Commit

Permalink
Merge pull request sorintlab#789 from gvalsecchig/patch-1
Browse files Browse the repository at this point in the history
doc: add OpenShift example
  • Loading branch information
sgotti authored Jun 22, 2020
2 parents 37f2376 + 0fca35f commit 8b42a97
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions examples/openshift/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Stolon inside openshift

Compared to the kubernetes deployments few changes are required. The purpose of this document is to cover these additional steps.

## Service account
The best approch to deploy Stolon in openshift is to create a dedicate service account and assign it the required Security context constraints (scc).
```
oc create sa <service_account_name>
```
stolon_role.yaml and role-binding.yaml must be modified to match service account name and the namespace for the cluster deployment

As additional step assign anyuid scc to the service account:
```
oc adm policy add-scc-to-user anyuid system:serviceaccount:<namespace>:<service_account_name>
```
## Patch cluster components:
Sentinel:
```
oc patch --local=true -f stolon-sentinel.yaml -p '{"spec":{"template":{"spec":{"serviceAccount": "<service_account_name>"}}}}' -o yaml > stolon-sentinel_new.yaml
```
Keeper
```
oc patch --local=true -f stolon-keeper.yaml -p '{"spec":{"template":{"spec":{"serviceAccount": "<service_account_name>"}}}}' -o yaml > stolon-keeper_new.yaml
```
Proxy
```
oc patch --local=true -f stolon-proxy.yaml -p '{"spec":{"template":{"spec":{"serviceAccount": "<service_account_name>"}}}}' -o yaml > stolon-proxy_new.yaml
```
## Deployment
Deploy the Stolon components using the files created at the previous step.

0 comments on commit 8b42a97

Please sign in to comment.