CMPP-Operator is the tool to simplify the deployment and management of http-cmpp-proxy clients on your Kubernetes cluster.
It is designed on top of the kubernetes CRD capabilities and runs as a series of deployment resources.. Although currently CMPPProxy is the only supported model, CRDs for more CMPP functionalities can be extended soon. With CMPPProxy as a CRD, configurations for one CMPP account is kept within one k8s resource object, acting as the single source of truth. To handle multiple CMPP account configurations, you can create multiple CMPPProxies, without the need to touch deployments/pods/services under the hood, thus keeping your hands clean.
- Access to a Kubernetes cluster, version 1.7 or later.
- kubectl installed
$ git clone https://github.com/sinoreps/cmpp-operator.git && cd cmpp-operator
$ kubectl create -f deploy/service_account.yaml
$ kubectl create -f deploy/role.yaml
$ kubectl create -f deploy/role_binding.yaml
$ kubectl create -f deploy/crds/cmpp_v1alpha1_cmppproxy_crd.yaml
$ kubectl create -f deploy/operator.yaml
$ kubectl create -f -<<EOF
apiVersion: cmpp.io/v1alpha1
kind: CMPPProxy
metadata:
name: example-cmppproxy
spec:
image: registry.cn-beijing.aliyuncs.com/sinoreps/cmppproxy:latest
account: "333"
password: "0555"
numConnections: 1
serverAddr: "127.0.0.1"
serviceCode: "9999"
enterpriseCode: "044022"
EOF
$ kubectl get pods -w
The deployment and its pods will be created in your currently active namespace.
Feel free to file an issue if you encounter issues, or create pull requests.