Skip to content

Commit

Permalink
Progress
Browse files Browse the repository at this point in the history
  • Loading branch information
jw-s committed Nov 30, 2017
1 parent b3a01ca commit 9387f8f
Show file tree
Hide file tree
Showing 14,178 changed files with 2,512,666 additions and 553,097 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 1 addition & 3 deletions .dockerignore
@@ -1,6 +1,4 @@
vendor
pkg
cmd
vendor/
.gitignore
.idea/
*.iml
4 changes: 0 additions & 4 deletions .draftignore

This file was deleted.

3 changes: 0 additions & 3 deletions Dockerfile

This file was deleted.

224 changes: 0 additions & 224 deletions Gopkg.lock

This file was deleted.

26 changes: 0 additions & 26 deletions Gopkg.toml

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017 Joel Whittaker-Smith

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
12 changes: 11 additions & 1 deletion Makefile
Expand Up @@ -7,8 +7,18 @@ all: build
build: bin/redis
docker build -t $(REDIS_OPERATOR_IMAGE_NAME) -f ./Dockerfile_prod .

bin/redis:
bin/redis:
GOOS=linux GOARCH=amd64 go build -o bin/redis-operator ./cmd/operator

deploy: undeploy
kubectl create -f contrib/kube-redis/redis-cr.yml
kubectl apply -f contrib/kube-redis/deployment.yml
kubectl create -f contrib/kube-redis/redis-server.yml

undeploy:
kubectl delete -f contrib/kube-redis/redis-server.yml || true
kubectl delete -f contrib/kube-redis/deployment.yml || true
kubectl delete -f contrib/kube-redis/redis-cr.yml || true

clean:
rm -rf bin/*
48 changes: 48 additions & 0 deletions README.md
@@ -0,0 +1,48 @@
# Redis Operator

## Status

*Development*

### Overview

The *Redis* operator manages redis servers deployed to *Kubernetes* and automates tasks related to operating a Redis server setup.

## Requirements

- Kubernetes 1.7+

## Demo

## Getting started

### Deploy Redis operator

See [instructions on how to install Redis operator](doc/INSTALL.md)

### Create and destroy an Redis Server

See [operator flow](doc/design/flow.md)

### Create

```bash
$ kubectl create -f contrib/kube-redis/redis-server.yml
```

See [Redis CRD schema](pkg/apis/redis/v1/redis.go)

A 3 member redis service will be created. (deployment resource of 3 replicas)

```bash
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
redis-slave-my-redis-2728646000-2hctj 1/1 Running 0 1m
redis-slave-my-redis-2728646000-70n86 1/1 Running 0 1m
redis-slave-my-redis-2728646000-npvgb 1/1 Running 0 1m
```

### Delete
```bash
$ kubectl delete -f contrib/kube-redis/redis-server.yml
```
21 changes: 0 additions & 21 deletions chart/go/.helmignore

This file was deleted.

4 changes: 0 additions & 4 deletions chart/go/Chart.yaml

This file was deleted.

0 comments on commit 9387f8f

Please sign in to comment.