Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix README links #101

Merged
merged 1 commit into from
Oct 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ The image versions deployed by the operator can be found on the [constants file]
[![Redis Operator Image](https://quay.io/repository/spotahome/redis-operator/status "Redis Operator Image")](https://quay.io/repository/spotahome/redis-operator)

## Operator deployment on kubernetes
In order to create Redis failovers inside a Kubernetes cluster, the operator has to be deployed. It can be done with a [deployment](example/operator.yaml) or with the provided [Helm chart](charts/redisoperator).
In order to create Redis failovers inside a Kubernetes cluster, the operator has to be deployed. It can be done with [deployment](example/operator) or with the provided [Helm chart](charts/redisoperator).

### Using a Deployment
To create the operator, you can directly create it with kubectl:
```
kubectl create -f https://raw.githubusercontent.com/spotahome/redis-operator/master/example/operator.yaml
kubectl create -f https://raw.githubusercontent.com/spotahome/redis-operator/master/example/operator/all-redis-operator-resources.yaml
```
This will create a deployment named `redisoperator`.

Expand All @@ -38,7 +38,7 @@ Once the operator is deployed inside a Kubernetes cluster, a new API will be acc

In order to deploy a new redis-failover a [specification](example/redisfailover/all-options.yaml) has to be created:
```
kubectl create -f https://raw.githubusercontent.com/spotahome/redis-operator/master/redisfailover/all-options.yaml
kubectl create -f https://raw.githubusercontent.com/spotahome/redis-operator/master/example/redisfailover/all-options.yaml
```

This redis-failover will be managed by the operator, resulting in the following elements created inside Kubernetes:
Expand Down
86 changes: 86 additions & 0 deletions example/operator/all-redis-operator-resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: redisoperator
name: redisoperator
spec:
replicas: 1
selector:
matchLabels:
app: redisoperator
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: redisoperator
spec:
containers:
- image: quay.io/spotahome/redis-operator:latest
imagePullPolicy: IfNotPresent
name: app
resources:
limits:
cpu: 100m
memory: 50Mi
requests:
cpu: 10m
memory: 50Mi
restartPolicy: Always
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: redisoperator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: redisoperator
subjects:
- kind: ServiceAccount
name: redisoperator
namespace: default
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: redisoperator
rules:
- apiGroups:
- storage.spotahome.com
resources:
- redisfailovers
verbs:
- "*"
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- "*"
- apiGroups:
- ""
resources:
- pods
- services
- endpoints
- events
- configmaps
verbs:
- "*"
- apiGroups:
- apps
resources:
- deployments
- statefulsets
verbs:
- "*"
- apiGroups:
- policy
resources:
- poddisruptionbudgets
verbs:
- "*"
apiVersion: v1
kind: ServiceAccount
metadata:
name: redisoperator