Coder Social home page Coder Social logo

amadeusitgroup / redis-operator Goto Github PK

View Code? Open in Web Editor NEW
167.0 13.0 62.0 14.77 MB

Redis Operator creates/configures/manages Redis clusters atop Kubernetes

License: MIT License

Makefile 0.45% Smarty 0.39% Go 97.01% Shell 2.08% Dockerfile 0.07%
kubernetes operator redis-cluster redis redis-operator

redis-operator's Introduction

Redis-Operator

logo

Build Status

Build Status Go Report Card codecov

Project status: alpha

This is an ongoing project.

The aim of this project is to ease the deployment and operations of a Redis-cluster in a kubernetes environment. It started internally at Amadeus in 2016, we initially designed this project to run on Openshift. This is the second version of our Redis-Operator that is based now on Kubernetes CustomResourceDefinition (CRD) for representing the RedisCluster configuration.

Overview

The Redis-cluster will be deployed thanks to a unique deployment. Each node of the Redis-cluster is running in its own Pod; At startup, each node has no active role (not slave nor master with slot), it just joins the cluster as a master without slot. See representation in the schema below

Initial state

At this point you have your redis process running, each node is aware of each other, but only one master prossess all slots.

In order to configure properly the different redis-servers and setup the redis cluster, we introduce the Redis-Operator.

The redis-operator is watching a new kind of Custom-Resource RedisCluster that stores the redis-cluster configuration: number of masters, and the replication factor (number of slaves by master) and the pod template. Then the redis-operator tries to apply this configuration to the set of redis-server processes. If the number of redis-servers doesn't correspond to the provided configuration, the manager scales the redis-node pods to obtain the proper number of redis-nodes.

Then reconciliation is constantly done between the state of the cluster and the configuration stored in the RedisCluster CR.

Development

If you want to take part of the development, you can follow the document: CONTRIBUTING.md.

Deployment

you can found checkt the docs/cookbook.md that is a step by step commands cookbook to test/demo the deployment of the operator and a redis-cluster with minikube.

Deployment environment requirements

As said, the project was initially designed to works on Openshift, but now support also Kubernetes. Please check the minimum environment version in the table below.

Environment Version
Openshift >= 3.7
Kubernetes >= 1.7

Helm deployment

You can found in the charts folder two helm charts:

  • redis-operator: used to deploy the redis-operator into your kubernetes cluster.
  • redis-cluster: used to create a "Redis Cluster" instance thanks to the redis-operator.

Instanciate the redis-operator:

helm install --name op chart/redis-operator
NAME:   op
LAST DEPLOYED: Tue Jan  9 23:41:13 2018
NAMESPACE: default
STATUS: DEPLOYED

RESOURCES:
==> v1beta1/Deployment
NAME               DESIRED  CURRENT  UP-TO-DATE  AVAILABLE  AGE
op-redis-operator  1        1        1           0          0s

TODO: document RBAC support.

Create your "Redis-Cluster"

Thanks to the helm chart chart/redis-cluster you can create a RedisCluster Custom Resource which will be processed by the redis-operator.

You can configure the Topology of the cluster by providing your own values.yml file to helm, or settings the value with the --set parameters when you execute helm install

helm install --name mycluster chart/redis-cluster --set numberOfMaster=3 --set replicationFactor=1
...

! Warning !, if you want to use the docker images corresponding to the level of code present in the "master" branch. you need to set the image tag when you instanciate the Redis-Cluster chart and the Redis-Operator chart. The "latest" tag is corresponding to the last validated release.

helm install --name mycluster chart/redis-cluster --set image.tag=master --set numberOfMaster=3 --set replicationFactor=1
...

Install the kubctl redis-cluster plugin

docs available here.

Deployment from source code

Build the container images

cd $GOPATH/src/github.com/amadeusitgroup/redis-operator
make container
CGO_ENABLED=0 GOOS=linux go build -i -installsuffix cgo -ldflags '-w' -o docker/operator/operator ./cmd/operator/main.go
CGO_ENABLED=0 GOOS=linux go build -i -installsuffix cgo -ldflags '-w' -o docker/redisnode/redisnode ./cmd/redisnode/main.go

you can define the docker images tag by adding the variable "VERSION"

make TAG=<Your-TAG> container

publish the docker images in your docker registry

make TAG=<Your-TAG> publish

In addition to the version, you can also specify the docker registry where will be publish the docker images with the variable DOCKER_REGISTRY

make DOCKER_REGISTRY="mydockerregistry:5000/" TAG=<Your-TAG> publish

How to Release the Redis-Operator

This project is using goreleaser and an additional script for releasing also the Helm chart.

For starting the delivery, you need to clone this repository, then:

zsh hack/release.sh <version> <remove-git>

a concreate example is: zsh ./hack/release.sh v1.0.1 upstream

This script:

  • generates locally the helm chart with the requested version.
  • updates the helm repo index file (docs/index.yaml) file with the new release.
  • creates a new changeset with all changes generated by the new release version, then tag this changeset.
  • push changeset and associated tag to the remote git repository.

redis-operator's People

Contributors

clamoriniere avatar clamoriniere1a avatar dbenque-1a avatar devlounge avatar gregbacchus avatar killmeplz avatar matthieucoder avatar sdminonne avatar showermat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redis-operator's Issues

Add the possibility to overwrite redis-server configuration parameters

Currently, only a few redis-server parameters can be set thru the redis-node parameters and pod-template present in the Redis-Cluster Custom-Resource.

The Idea is to add new Key-Value map field in the Redis-Cluster.Spec (like the Metadata.Labels) That will be used by the redis-node process to configure the Redis-Server process.

maxMemory is a uint32

That makes the max cache ~4GB which is not nearly big enough for any application. Is there a reason a uint32 was used for this setting? Does simply making it a uint64 resolve this issue?

Controller confuses multiple RedisClusters in different namespaces that have the same name.

Basically if we have a RedisCluster{Name: Foo, Namespace: Bar} and another one RedisCluster{Name: Foo, Namespace: Baz}, the controller will attempt to manage their combined pods together.

Source of this might be here:

return p.PodLister.List(selector)

// GetRedisClusterPods return list of Pod attached to a RedisCluster
func (p *RedisClusterControl) GetRedisClusterPods(redisCluster *rapi.RedisCluster) ([]*kapiv1.Pod, error) {
	selector, err := CreateRedisClusterLabelSelector(redisCluster)
	if err != nil {
		return nil, err
	}
	return p.PodLister.List(selector)
}

I don't see any reference to namespace in the selector itself, or here. So my best guess is that this function is returning all redis pods across the 2 example namespaces.

Kubctl plugin redisoperator didn't work on GKE cluster

During a test on GKE cluster, I discovered that kubectl rediscluster plugin didn't works properly with the GKE kubeconfig auth_provider config.

plugin version: git commit_id 695c499

> plugin rediscluster
F0703 18:00:47.723112   20285 main.go:60] Unable to init redis.clientset from kubeconfig:No Auth Provider found for name "gcp"
goroutine 1 [running]:
github.com/amadeusitgroup/redis-operator/vendor/github.com/golang/glog.stacks(0xc42033cc00, 0xc4201481c0, 0x7f, 0xd4)
	/Users/clamoriniere/dev/projects/redis-operator-oss/src/github.com/amadeusitgroup/redis-operator/vendor/github.com/golang/glog/glog.go:766 +0xcf
github.com/amadeusitgroup/redis-operator/vendor/github.com/golang/glog.(*loggingT).output(0x228ede0, 0xc400000003, 0xc42021a2c0, 0x21feb1c, 0x7, 0x3c, 0x0)
	/Users/clamoriniere/dev/projects/redis-operator-oss/src/github.com/amadeusitgroup/redis-operator/vendor/github.com/golang/glog/glog.go:717 +0x30f
github.com/amadeusitgroup/redis-operator/vendor/github.com/golang/glog.(*loggingT).printf(0x228ede0, 0x3, 0x1b8590e, 0x31, 0xc420419890, 0x1, 0x1)
	/Users/clamoriniere/dev/projects/redis-operator-oss/src/github.com/amadeusitgroup/redis-operator/vendor/github.com/golang/glog/glog.go:655 +0x14b
github.com/amadeusitgroup/redis-operator/vendor/github.com/golang/glog.Fatalf(0x1b8590e, 0x31, 0xc420419890, 0x1, 0x1)
	/Users/clamoriniere/dev/projects/redis-operator-oss/src/github.com/amadeusitgroup/redis-operator/vendor/github.com/golang/glog/glog.go:1145 +0x67
main.main()
	/Users/clamoriniere/dev/projects/redis-operator-oss/src/github.com/amadeusitgroup/redis-operator/cmd/kubectl-plugin/main.go:60 +0x427
error: exit status 255

it seams related to: kubernetes/client-go#242

Redisnode stopped working

docker run -it --entrypoint /bin/sh  redisoperator/redisnode:latest
/data # /redisnode 
/bin/sh: /redisnode: not found

After linking musl library everything works fine

/data # mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
/data # /redisnode 
Program started at: 2018-10-01 16:51:49.758428273 +0000 UTC m=+0.221624727

Haven't found anything suspicious in recent commits.

Getting cluster slots response empty

When i deploy helm chart of cluster i get only two pods. One of them shows:
Readiness probe failed: HTTP probe failed with statuscode: 503

with error Getting cluster slots response empty for readiness in logs.

case-insensitive import collision

hi, i can't build the operator from the source code

cmd/operator/main.go:9:2: case-insensitive import collision: "github.com/AmadeusITGroup/Redis-Operator/vendor/github.com/golang/glog" and "github.com/amadeusitgroup/redis-operator/vendor/github.com/golang/glog"
cmd/operator/main.go:10:2: case-insensitive import collision: "github.com/AmadeusITGroup/Redis-Operator/vendor/github.com/spf13/pflag" and "github.com/amadeusitgroup/redis-operator/vendor/github.com/spf13/pflag"

Improve RollingUpdate trigger detection

Currently only a docker image change in a container specification in the rediscluster.spec.template is triggering a cluster rolling-update.

But the operator needs to trigger a rolling-update for any change in the rediscluster.spec.template

Add Prometheus metrics in Operator

Some basic metrics can be added in the Operator in order to know how it behaves:

  • number of Redis-Cluster handle
  • How long the sync function takes
  • the number of errors.
  • ...

Operator logs: cannot list redisclusters.redis.k8s-operator.io at the cluster scope

I've installed operator chart with HELM by yours readme step-by-step:

  1. Installed go compiler
  2. Installed kubectl plugin as it described in cookbook.md
  3. Installed redis-operator

helm install --name op chart/redis-operator

NAME:   op
LAST DEPLOYED: Tue Jul  3 17:10:49 2018
NAMESPACE: default
STATUS: DEPLOYED

RESOURCES:
==> v1beta1/Deployment
NAME               DESIRED  CURRENT  UP-TO-DATE  AVAILABLE  AGE
op-redis-operator  1        0        0           0          0s

==> v1beta1/ClusterRole
NAME            AGE
redis-operator  0s

==> v1beta1/ClusterRoleBinding
NAME            AGE
redis-operator  0s

==> v1/ServiceAccount
NAME            SECRETS  AGE
redis-operator  1        0s

kubectl version

Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.1", GitCommit:"d4ab47518836c750f9949b9e0d387f20fb92260b", GitTreeState:"archive", BuildDate:"2018-04-26T10:10:34Z", GoVersion:"go1.9.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.5", GitCommit:"32ac1c9073b132b8ba18aa830f46b77dcceb0723", GitTreeState:"clean", BuildDate:"2018-06-21T11:34:22Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

kubectl get all

NAME                                    READY     STATUS    RESTARTS   AGE
pod/op-redis-operator-b64889d49-8zpw9   1/1       Running   0          9m

NAME                 TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)        AGE
service/kubernetes   ClusterIP   10.233.0.1     <none>        443/TCP        4d

NAME                                DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/op-redis-operator   1         1         1            1           9m

NAME                                          DESIRED   CURRENT   READY     AGE
replicaset.apps/op-redis-operator-b64889d49   1         1         1         9m

When I try to install redis-cluster chart I have an error:

helm install --name cluster chart/redis-cluster
Error: apiVersion "redisoperator.k8s.io/v1alpha1" in redis-cluster/templates/RedisCluster.yml is not available

And I encountered an error in operatior logs:

E0703 11:11:14.938525       1 reflector.go:205] github.com/amadeusitgroup/redis-operator/pkg/client/informers/externalversions/factory.go:73: Failed to list *v1.RedisCluster: redisclusters.redis.k8s-operator.io is forbidden: User "system:serviceaccount:default:redis-operator" cannot list redisclusters.redis.k8s-operator.io at the cluster scope
E0703 11:11:15.941721       1 reflector.go:205] github.com/amadeusitgroup/redis-operator/pkg/client/informers/externalversions/factory.go:73: Failed to list *v1.RedisCluster: redisclusters.redis.k8s-operator.io is forbidden: User "system:serviceaccount:default:redis-operator" cannot list redisclusters.redis.k8s-operator.io at the cluster scope
E0703 11:11:16.945293       1 reflector.go:205] github.com/amadeusitgroup/redis-operator/pkg/client/informers/externalversions/factory.go:73: Failed to list *v1.RedisCluster: redisclusters.redis.k8s-operator.io is forbidden: User "system:serviceaccount:default:redis-operator" cannot list redisclusters.redis.k8s-operator.io at the cluster scope

Full log is available here

Redis operator is not able to differentiate between multiple clusters when run on different ports other than 6379 which is hardcoded.

Redis operator is not able to differentiate between multiple clusters when run on different ports other than 6379 which is hardcoded.

Steps to reproduce:

  1. deploy redis cluster with hostnetwork=true on port 6379.
    ( operator creates a cluster with all pods running on 6379 and all good)
  2. deploy 2nd cluster with hostnetwork=true on port 6389.
    (operator creates svc for the second cluster with port no:6379 as it is hardcoded here:
    Ports: []kapiv1.ServicePort{{Port: 6379, Name: "redis"}},
    )
  3. the operator now gets confused and mixes both the clusters together.
    RedisCluster.txt

Can't build operator from GO sources

Hello,

I'm trying to build operator, but this error is occurred

github.com/amadeusitgroup/redis-operator/pkg/api/redis/v1 /go/pkg/mod/github.com/amadeusitgroup/[email protected]/pkg/api/redis/v1/zz_generated.deepcopy.go:48:15: scheme.AddGeneratedDeepCopyFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedDeepCopyFuncs) /go/pkg/mod/github.com/amadeusitgroup/[email protected]/pkg/api/redis/v1/zz_generated.deepcopy.go:49:3: undefined: conversion.GeneratedDeepCopyFunc /go/pkg/mod/github.com/amadeusitgroup/[email protected]/pkg/api/redis/v1/zz_generated.deepcopy.go:53:3: undefined: conversion.GeneratedDeepCopyFunc /go/pkg/mod/github.com/amadeusitgroup/[email protected]/pkg/api/redis/v1/zz_generated.deepcopy.go:57:3: undefined: conversion.GeneratedDeepCopyFunc /go/pkg/mod/github.com/amadeusitgroup/[email protected]/pkg/api/redis/v1/zz_generated.deepcopy.go:61:3: undefined: conversion.GeneratedDeepCopyFunc /go/pkg/mod/github.com/amadeusitgroup/[email protected]/pkg/api/redis/v1/zz_generated.deepcopy.go:65:3: undefined: conversion.GeneratedDeepCopyFunc /go/pkg/mod/github.com/amadeusitgroup/[email protected]/pkg/api/redis/v1/zz_generated.deepcopy.go:69:3: undefined: conversion.GeneratedDeepCopyFunc /go/pkg/mod/github.com/amadeusitgroup/[email protected]/pkg/api/redis/v1/zz_generated.deepcopy.go:73:3: undefined: conversion.GeneratedDeepCopyFunc

Build with

CGO_ENABLED=0 go build -i -installsuffix cgo -ldflags '-w -s' -o Redis-Operator/docker/operator/operator Redis-Operator/cmd/redisnode/main.go

Also, I tried to change versions GO and go-client for k8s, but no result.
tested with GO v1.10 and v1.12

New cluster only creating a single pod

I'm running into an error that is resulting in the redis cluster never fully forming.

A RedisCluster is created (via helm) in a namespace called "redis" with numberOfMaster: 3 and replicationFactor: 1. The operator starts working on the cluster and immediately spews some strange logs:

NumberOfMaster:0
MinReplicationFactor:0
MaxReplicationFactor:0
NodesPlacement:

NbPods:0
NbPodsReady:0
NbRedisRunning:0

Nodes (0): []
}}] error: Operation cannot be fulfilled on redisclusters.redisoperator.k8s.io "redis-cluster": the object has been modified; please apply your changes to the latest version and try again
I0705 23:40:23.226555       1 controller.go:168] Finished syncing RedisCluster "redis/redis-cluster" (61.243177ms
E0705 23:40:23.226620       1 controller.go:151] Error syncing rediscluster: Operation cannot be fulfilled on redisclusters.redisoperator.k8s.io "redis-cluster": the object has been modified; please apply your changes to the latest version and try again
I0705 23:40:23.226725       1 controller.go:165] sync() key:redis/redis-cluster
E0705 23:40:23.227655       1 controller.go:407] Unable to retrieve the associated Redis Node with the pod: rediscluster-redis-cluster-lhmf9, ip:, err:node not founded
I0705 23:40:23.227749       1 checks.go:107] compare status.NbPods: 0 - 1
I0705 23:40:23.258568       1 controller.go:168] Finished syncing RedisCluster "redis/redis-cluster" (31.79447ms
I0705 23:40:23.258676       1 controller.go:165] sync() key:redis/redis-cluster
E0705 23:40:23.259229       1 controller.go:407] Unable to retrieve the associated Redis Node with the pod: rediscluster-redis-cluster-lhmf9, ip:, err:node not founded
I0705 23:40:23.271476       1 controller.go:168] Finished syncing RedisCluster "redis/redis-cluster" (12.764577ms
I0705 23:40:23.271544       1 controller.go:165] sync() key:redis/redis-cluster

This repeats a few times until it settles into the following:

E0705 23:51:15.374957       1 controller.go:407] Unable to retrieve the associated Redis Node with the pod: rediscluster-redis-cluster-lhmf9, ip:10.128.4.117, err:node not founded
I0705 23:51:15.375198       1 controller.go:168] Finished syncing RedisCluster "redis/redis-cluster" (2.00105339s
I0705 23:51:43.374389       1 controller.go:165] sync() key:redis/redis-cluster
E0705 23:51:45.375369       1 controller.go:407] Unable to retrieve the associated Redis Node with the pod: rediscluster-redis-cluster-lhmf9, ip:10.128.4.117, err:node not founded
I0705 23:51:45.375714       1 controller.go:168] Finished syncing RedisCluster "redis/redis-cluster" (2.001262793s
I0705 23:52:13.374669       1 controller.go:165] sync() key:redis/redis-cluster
E0705 23:52:15.375377       1 controller.go:407] Unable to retrieve the associated Redis Node with the pod: rediscluster-redis-cluster-lhmf9, ip:10.128.4.117, err:node not founded
I0705 23:52:15.375644       1 controller.go:168] Finished syncing RedisCluster "redis/redis-cluster" (2.000922663s

A single pod is created named rediscluster-redis-cluster-lhmf9 which for most intents looks fine with mostly normal (as far as I can tell) logs, however further cluster nodes are never created.

redis fail to start with `unknown flag: --max-memory-policy` error

getting unknown flag: --max-memory-policy on redis startup. Please say, if I have missed something or are doing something wrong.

$ git clone https://github.com/AmadeusITGroup/Redis-Operator.git

$ git rev-parse HEAD
e3484d9c44af945a9953737f30dcf048b83bf9ac

$ helm install --name op chart/redis-operator

$ cd chart/redis-cluster
$ helm install --name mycluster . --set numberOfMaster=3 --set replicationFactor=1

NAME:   mycluster
LAST DEPLOYED: Sat Sep 22 12:05:17 2018
NAMESPACE: default
STATUS: DEPLOYED

RESOURCES:
==> v1beta1/ClusterRole
NAME        AGE
redis-node  0s

==> v1beta1/ClusterRoleBinding
NAME        AGE
redis-node  0s

==> v1/ServiceAccount
NAME        SECRETS  AGE
redis-node  1        0s

==> v1alpha1/RedisCluster
NAME       AGE
mycluster  0s

$ kubectl get pods

op-redis-operator-54d86fd856-fxhf5   1/1       Running            0          35m
rediscluster-mycluster-qm2fq         0/1       CrashLoopBackOff   1          14s```

$ kubectl logs rediscluster-mycluster-qm2fq```
Program started at: 2018-09-22 02:05:35.620877372 +0000 UTC m=+0.065421591
BUILDTIME=2018-07-03/17:42:00
TAG=latest
COMMIT=695c49903eceee361c910c007ca9bc63ca99fbd0
VERSION=0.1.0
unknown flag: --max-memory-policy
Usage of /redisnode:
      --alsologtostderr                  log to standard error as well as files (default false)
      --bin string                       redis server binary file name (default "redis-server")
      --c string                         redis config file path (default "/redis-server/redis.conf")

<snip>```

$ grep resources values.yaml
```resources: {}
  # We usually recommend not to specify default resources and to leave this as a conscious
  # resources, such as Minikube. If you do want to specify resources, uncomment the following
  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.```


```$ minikube version
minikube version: v0.28.2

helm version
Client: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"}

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.2", GitCommit:"bb9ffb1654d4a729bb4cec18ff088eacc153c239", GitTreeState:"clean", BuildDate:"2018-08-08T16:31:10Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-26T16:44:10Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

Max memory setting ignores container overhead

When I set a memory limit for Redis pods using the provided redis-cluster chart, it appears to take the exact number I provide for the memory limit and place that in redis.conf on the maxmemory line. This neglects the overhead of Redis itself, the redisnode executable, and any other miscellanea that Kubernetes includes in its overhead accounting. In my setup, this adds up to about 40 MB that the container will use beyond Redis's memory limit. Thus, when Redis approaches capacity, the container's memory usage exceeds its configured resource limit, and Kubernetes kills the pod. I've been working around this by manually updating Redis's maxmemory to 100 MB less than the resource limit, which solves the problem. It would be nice if this could be automated so that resource limits work as expected.

redis5.0.4 problem with GOSSIP

redis5.0.4 problem with GOSSIP

hi ,when i use redis5.0.4 to create cluster in k8s. meet gossip error.
when redis-cli --cluster create *** command, connect node with 172.20.17.0:16379 in log.
is 172.20.17.0 a network address not node ip 172.20.17.34. so i use node nodeSelector to bind all my redis instance to a single node is ok .
how do you solve this issue? thanks .

`make` throws go build errors on Mac and Debian

$ make container
CGO_ENABLED=0 GOOS=linux go build -i -installsuffix cgo -ldflags "-w -X github.com/amadeusitgroup/redis-operator/pkg/utils.TAG=0.1.1 -X github.com/amadeusitgroup/redis-operator/pkg/utils.COMMIT=778e57b067870a9f49157d47225377ff4cc50df1 -X github.com/amadeusitgroup/redis-operator/pkg/utils.VERSION=0.1.0 -X github.com/amadeusitgroup/redis-operator/pkg/utils.BUILDTIME=2019-07-27/10:38:17 -s" -o docker/operator/operator ./cmd/operator/main.go   
go build errors: mkdir /usr/local/go/pkg/linux_amd64_cgo/: permission denied
go build internal/nettrace: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build container/list: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build math/bits: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build crypto/internal/subtle: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build crypto/subtle: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build internal/x/crypto/cryptobyte/asn1: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build runtime/internal/sys: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build unicode/utf8: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build internal/race: open /usr/local/go/pkg/linux_amd64_cgo/internal/race.a: no such file or directory
go build unicode/utf16: open /usr/local/go/pkg/linux_amd64_cgo/unicode/utf16.a: no such file or directory
go build sync/atomic: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build runtime/internal/atomic: open /usr/local/go/pkg/linux_amd64_cgo/runtime/internal/atomic.a: no such file or directory
go build internal/cpu: open /usr/local/go/pkg/linux_amd64_cgo/internal/cpu.a: no such file or directory
go build unicode: open /usr/local/go/pkg/linux_amd64_cgo/unicode.a: no such file or directory
go build internal/x/crypto/curve25519: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build encoding: open /usr/local/go/pkg/linux_amd64_cgo/encoding.a: no such file or directory
Makefile:30: recipe for target 'buildlinux-operator' failed
make: *** [buildlinux-operator] Error 1
make plugin
CGO_ENABLED=0 go build -i -installsuffix cgo -ldflags "-w -X github.com/amadeusitgroup/redis-operator/pkg/utils.TAG=0.1.1 -X github.com/amadeusitgroup/redis-operator/pkg/utils.COMMIT=778e57b067870a9f49157d47225377ff4cc50df1 -X github.com/amadeusitgroup/redis-operator/pkg/utils.VERSION=0.1.0 -X github.com/amadeusitgroup/redis-operator/pkg/utils.BUILDTIME=2019-07-27/10:44:27 -s" -o bin/kubectl-plugin ./cmd/kubectl-plugin
go build unicode/utf8: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build internal/x/crypto/curve25519: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build encoding: open /usr/local/go/pkg/linux_amd64_cgo/encoding.a: no such file or directory
go build unicode/utf16: open /usr/local/go/pkg/linux_amd64_cgo/unicode/utf16.a: no such file or directory
go build internal/cpu: open /usr/local/go/pkg/linux_amd64_cgo/internal/cpu.a: no such file or directory
Makefile:27: recipe for target 'build-kubectl-plugin' failed
make: *** [build-kubectl-plugin] Error 1

I was able to get past this by chowning $GOROOT to the user, which is not ideal, and also by removing -i -installsuffix cgo from the go build commands in the makefile. Not sure what effect this has on the whole.

Thank you so much for this project, by the way. It works beautifully.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.