cmpp-operator

module
v0.0.0-...-b4e0555 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2019 License: MIT

README

Build Status

Overview

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.

Get started

Prerequisites

  • Access to a Kubernetes cluster, version 1.7 or later.
  • kubectl installed

Installation

Clone the repo
$ git clone https://github.com/sinoreps/cmpp-operator.git && cd cmpp-operator
Setup Service Account
$ kubectl create -f deploy/service_account.yaml
Setup RBAC
$ kubectl create -f deploy/role.yaml
$ kubectl create -f deploy/role_binding.yaml
Setup the CRD
$ kubectl create -f deploy/crds/cmpp_v1alpha1_cmppproxy_crd.yaml
Deploy the cmpp-operator
$ kubectl create -f deploy/operator.yaml

Add a CMPPProxy

$ 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
check the newly created pods
$ kubectl get pods -w

The deployment and its pods will be created in your currently active namespace.

Contributing

Feel free to file an issue if you encounter issues, or create pull requests.

Directories

Path Synopsis
cmd
manager command
pkg
apis/cmpp/v1alpha1
Package v1alpha1 contains API Schema definitions for the cmpp v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=cmpp.io
Package v1alpha1 contains API Schema definitions for the cmpp v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=cmpp.io

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL