forked from sorintlab/stolon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request sorintlab#789 from gvalsecchig/patch-1
doc: add OpenShift example
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 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
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. |