Skip to content

Commit

Permalink
Merge pull request #101 from spotahome/links
Browse files Browse the repository at this point in the history
Fix README links
  • Loading branch information
jchanam authored Oct 15, 2018
2 parents b5f181c + 3277ad2 commit 634495a
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 3 deletions.
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

0 comments on commit 634495a

Please sign in to comment.