go-register-server
by Helm
Helm chartv0.21.0App 0.21.0
go-register-server for Choerodon
About this chart
Choerodon Asgard Service
Choerodon Asgard Service 是一个任务调度服务,通过saga 实现微服务之间的数据一致性。
Introduction
Add Helm chart repository
helm repo add choerodon https://openchart.choerodon.com.cn/choerodon/c7n
helm repo update
Installing the Chart
$ helm install c7n/go-register-server \
--set service.enabled=true \
--set service.name=register-server \
--set env.open.REGISTER_SERVICE_NAMESPACE="c7n-system" \
--set rbac.create=true \
--name register-server \
--namespace c7n-system
Specify each parameter using the --set key=value[,key=value] argument to helm install.
Uninstalling the Chart
$ helm delete register-server
Configuration
| Parameter | Description | Default |
|---|---|---|
replicaCount | Replicas count | 1 |
deployment.managementPort | 服务管理端口 | 8000 |
env.open.REGISTER_SERVICE_NAMESPACE | 注册中心监听的namespace,多个namespace 用空格间隔 | c7n-system |
service.enabled | 是否创建service | false |
service.port | service端口 | 8000 |
service.name | service名称 | register-server |
service.type | service类型 | ClusterIP |
metrics.path | 收集应用的指标数据路径 | `` |
metrics.group | 性能指标应用分组 | go-register-server |
logs.parser | 日志收集格式 | docker |
ingress.enabled | 是否创建ingress | false |
ingress.host | ingress地址 | register.example.com |
rbac.create | 是否创建ClusterRole 和serviceAccountName | true |
rbac.serviceAccountName | serviceAccountName | default |
resources.limits | k8s中容器能使用资源的资源最大值 | 512Mi |
resources.requests | k8s中容器使用的最小资源需求 | 256Mi |
验证部署
curl $(kubectl get svc register-server -o jsonpath="{.spec.clusterIP}" -n c7n-system):8000/eureka/apps
出现以下类似信息即为成功部署
{
"name": "go-register-server",
"instance": [
{
"instanceId": "192.168.3.19:go-register-server:8000",
"hostName": "192.168.3.19",
"app": "go-register-server",
"ipAddr": "192.168.3.19",
"status": "UP",
...
"metadata": {
"VERSION": "0.18.0"
},
...
}
]
}
Deploy go-register-server with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has go-register-server on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartgo-register-server is pinned at v0.21.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply