Giter Club home page Giter Club logo

codis-operator's People

Contributors

tangcong avatar

Stargazers

 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

codis-operator's Issues

spec.resources[storage]: Required value

create Claim sample-redis-volume-sample-redis-0 for Pod sample-redis-0 in StatefulSet sample-redis failed error: PersistentVolumeClaim "sample-redis-volume-sample-redis-0" is invalid: spec.resources[storage]: Required value

hpa targets is unknown

NAME                                             REFERENCE                 TARGETS         MINPODS   MAXPODS   REPLICAS   AGE
horizontalpodautoscaler.autoscaling/sample-hpa   Deployment/sample-proxy   <unknown>/10%   1         5         1          44m

Specifying loadbalancer for proxy service

Hi,
I'm using default kubernetes deployment scripts from codis repo with small changes on azure aks on production. But I was faced some situations when the proxy or the server has fallen. So I started to search another solution for codis on k8s. I've tried your project, but as far as I saw, it install the services as internal for the cluster. I need LoadBalancer for proxy and fe services, and also I need to add annotations for specifying loadbalancer for internal network use, so azure aks sets this service a static internal ip address. How can I specfy LoadBalancer type for the services and add annotations to the services? Also has there any issue to prevent us to use this on production environments?

failed to delete codiscluster resource

pod/sample-dashboard-0              0/1       Terminating   0          2s
pod/sample-fe-75db67794-9qtfm       1/1       Terminating   0          55s
pod/sample-proxy-7c46c9b9b5-nrq6f   0/1       Terminating   0          5s
pod/sample-proxy-7c46c9b9b5-wnzdk   0/1       Terminating   0          5s
pod/sample-redis-0                  0/1       Terminating   0          8s

NAME                   TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
service/sample-fe      NodePort    10.109.254.221   <none>        9090:31801/TCP   2s
service/sample-redis   ClusterIP   None             <none>        6379/TCP         2s

NAME                                      DESIRED   CURRENT   READY     AGE
replicaset.apps/sample-fe-75db67794       2         0         0         55s
replicaset.apps/sample-proxy-7c46c9b9b5   3         0         0         5s

CodisCluster控制器自动化部署到K8S(DevOps,以TencentHub为例)

核心流程

  • 根据Dockerfile构建编译镜像环境、运行镜像
  • 将构建好的镜像推送到自定义仓库
  • 通过YML文件(deploy/manager/deployment.yml)部署到K8S集群

TencentHub配置流程

  • 新建TKE/K8S集群(如有一台及以上云CVM主机,可选择新增空集群,TEK集群不收费,只收取CVM机器费用)

  • TencentHub控制面板,设置选项,源代码授权, 个人账户源代码授权,GITHUB

  • 项目仓库,新建项目,codis
    image

  • 项目仓库,项目仓库名,新建工作流程,设置项目基础信息,如GIT地址,编译方式,超时时间等。
    image

  • 添加第一个工作流组件,hub.tencentyun.com/tencenthub/docker_builder,构建镜像,填写镜像地址等相关参数
    image

  • 添加第二个工作流组件, 选择kubectl_cmd组件,hub.tencentyun.com/tencenthub/kubectl_cmd,自动化部署到K8S,不过目前暂不支持直接上传YML文件,需要新增变量存储。
    image

  • 添加第三个工作流组件(可选),如钉钉消息、企业微信、邮件等。

image

delete dashboard failed

{
"kind": "StatefulSet",
"apiVersion": "apps/v1beta2",
"metadata": {
"name": "sample-dashboard",
"namespace": "codis-operator-system",
"selfLink": "/apis/apps/v1beta2/namespaces/codis-operator-system/statefulsets/sample-dashboard",
"uid": "107ed948-fb6e-11e8-9a76-080027edd7cc",
"resourceVersion": "545378",
"generation": 2,
"creationTimestamp": "2018-12-09T04:51:17Z",
"deletionTimestamp": "2018-12-11T14:06:28Z",
"deletionGracePeriodSeconds": 0,
"ownerReferences": [
{
"apiVersion": "codis.k8s.io/v1alpha1",
"kind": "CodisCluster",
"name": "sample",
"uid": "d74b97a6-fb69-11e8-9a76-080027edd7cc",
"controller": true,
"blockOwnerDeletion": true
}
],
"finalizers": [
"foregroundDeletion"
]
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"clusterName": "sample",
"component": "codis-dashboard"
}
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"clusterName": "sample",
"component": "codis-dashboard"
}
},
"spec": {
"containers": [
{
"name": "codis-dashboard",
"image": "codis3.2:latest",
"command": [
"codis-dashboard"
],
"args": [
"-c",
"$(CODIS_PATH)/config/dashboard.toml",
"--host-admin",
"$(POD_IP):18000",
"--product_name",
"$(PRODUCT_NAME)",
"--product_auth",
"product"
],
"ports": [
{
"name": "dashboard",
"containerPort": 18080,
"protocol": "TCP"
}
],
"env": [
{
"name": "CODIS_PATH",
"value": "/gopath/src/github.com/CodisLabs/codis"
},
{
"name": "PRODUCT_NAME",
"value": "codis-test"
},
{
"name": "POD_IP",
"valueFrom": {
"fieldRef": {
"apiVersion": "v1",
"fieldPath": "status.podIP"
}
}
},
{
"name": "POD_NAME",
"valueFrom": {
"fieldRef": {
"apiVersion": "v1",
"fieldPath": "metadata.name"
}
}
}
],
"resources": {},
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"imagePullPolicy": "IfNotPresent"
}
],
"restartPolicy": "Always",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"securityContext": {},
"schedulerName": "default-scheduler"
}
},
"serviceName": "",
"podManagementPolicy": "OrderedReady",
"updateStrategy": {
"type": "RollingUpdate",
"rollingUpdate": {
"partition": 0
}
},
"revisionHistoryLimit": 10
},
"status": {
"observedGeneration": 2,
"replicas": 1,
"readyReplicas": 1,
"currentRevision": "sample-dashboard-7ccf6f9689",
"updateRevision": "sample-dashboard-7ccf6f9689",
"collisionCount": 0
}
}

NOAUTH Authentication required

kube create -f deploy/manager/deployment-dev.yml
kube create -f examples/sample-1.yml
登录到容器发现 运行codis报错“NOAUTH Authentication required”

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.