nacos-group / nacos-controller Goto Github PK
View Code? Open in Web Editor NEWnacos k8s controller
License: Apache License 2.0
nacos k8s controller
License: Apache License 2.0
环境
centos7 Linux 4.17.11-1.el7.elrepo.x86_64 #1 SMP Sat Jul 28 09:33:09 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
k8s 1.16.15
资源
cluster2server.yaml
apiVersion: nacos.io/v1
kind: DynamicConfiguration
metadata:
name: dc-demo-cluster2server
spec:
dataIds:
apiVersion: v1
kind: ConfigMap
metadata:
name: nacos-config-cm
namespace: default
data:
data-id1.properties: |
key=value
key2=value2
data-id2.yml: |
app:
name: test
apiVersion: v1
data:
ak: YQo= #未开启认证,随便设置的,nacos-controller未报错
sk: YQo=
kind: Secret
metadata:
name: nacos-auth
namespace: default
server2cluster.yaml
apiVersion: nacos.io/v1
kind: DynamicConfiguration
metadata:
name: dc-demo-server2cluster
spec:
dataIds:
k8s编辑nacos-config-cm后,nacos-controller日志如下:
2024-01-24T07:22:34Z INFO dynamicconfiguration-resource default {"name": "dc-demo-server2cluster"}
2024-01-24T07:22:34Z INFO dynamicconfiguration-resource validate update {"name": "dc-demo-server2cluster"}
2024-01-24T07:22:34Z INFO dynamicconfiguration-resource default {"name": "dc-demo-server2cluster"}
2024-01-24T07:22:34Z INFO dynamicconfiguration-resource validate update {"name": "dc-demo-server2cluster"}
2024-01-24T07:22:42Z INFO dynamicconfiguration-resource default {"name": "dc-demo-server2cluster"}
2024-01-24T07:22:42Z INFO dynamicconfiguration-resource validate create {"name": "dc-demo-server2cluster"}
2024-01-24T07:22:42Z INFO Add finalizer {"controller": "dynamicconfiguration", "controllerGroup": "nacos.io", "controllerKind": "DynamicConfiguration", "DynamicConfiguration": {"name":"dc-demo-server2cluster","namespace":"default"}, "namespace": "default", "name": "dc-demo-server2cluster", "reconcileID": "91d769db-c145-42e3-b8ae-20a9f70afdc6"}
2024-01-24T07:22:42Z INFO dynamicconfiguration-resource default {"name": "dc-demo-server2cluster"}
2024-01-24T07:22:42Z INFO dynamicconfiguration-resource validate update {"name": "dc-demo-server2cluster"}
2024-01-24T07:22:42Z INFO start listening from nacos server {"controller": "dynamicconfiguration", "controllerGroup": "nacos.io", "controllerKind": "DynamicConfiguration", "DynamicConfiguration": {"name":"dc-demo-server2cluster","namespace":"default"}, "namespace": "default", "name": "dc-demo-server2cluster", "reconcileID": "91d769db-c145-42e3-b8ae-20a9f70afdc6", "group": "default", "namespace": "public", "dataId": "data-id1.properties"}
2024-01-24T07:22:42Z INFO start listening from nacos server {"controller": "dynamicconfiguration", "controllerGroup": "nacos.io", "controllerKind": "DynamicConfiguration", "DynamicConfiguration": {"name":"dc-demo-server2cluster","namespace":"default"}, "namespace": "default", "name": "dc-demo-server2cluster", "reconcileID": "91d769db-c145-42e3-b8ae-20a9f70afdc6", "group": "default", "namespace": "public", "dataId": "data-id2.yml"}
2024-01-24T07:31:57Z INFO config published to nacos server {"controller": "dynamicconfiguration", "controllerGroup": "nacos.io", "controllerKind": "DynamicConfiguration", "DynamicConfiguration": {"name":"dc-demo-cluster2server","namespace":"default"}, "namespace": "default", "name": "dc-demo-cluster2server", "reconcileID": "798963a0-c062-4c02-ab81-3822d76d5a89", "group": "default", "namespace": "test", "dataId": "data-id1.properties"}
2024-01-24T07:31:57Z INFO skip syncing, due to same md5 of content {"controller": "dynamicconfiguration", "controllerGroup": "nacos.io", "controllerKind": "DynamicConfiguration", "DynamicConfiguration": {"name":"dc-demo-cluster2server","namespace":"default"}, "namespace": "default", "name": "dc-demo-cluster2server", "reconcileID": "798963a0-c062-4c02-ab81-3822d76d5a89", "group": "default", "namespace": "test", "dataId": "data-id2.yml", "md5": "4e22ae55a981aa1e934f08e71c9603ff"}
2024-01-24T07:31:57Z INFO skip syncing, due to same md5 of content {"controller": "dynamicconfiguration", "controllerGroup": "nacos.io", "controllerKind": "DynamicConfiguration", "DynamicConfiguration": {"name":"dc-demo-cluster2server","namespace":"default"}, "namespace": "default", "name": "dc-demo-cluster2server", "reconcileID": "18a7b1c1-bbe3-4df6-b4f9-c54687d73c5b", "group": "default", "namespace": "test", "dataId": "data-id1.properties", "md5": "d8d9a26f34fa1f8e9c1c8bc2e83e0262"}
2024-01-24T07:31:57Z INFO skip syncing, due to same md5 of content {"controller": "dynamicconfiguration", "controllerGroup": "nacos.io", "controllerKind": "DynamicConfiguration", "DynamicConfiguration": {"name":"dc-demo-cluster2server","namespace":"default"}, "namespace": "default", "name": "dc-demo-cluster2server", "reconcileID": "18a7b1c1-bbe3-4df6-b4f9-c54687d73c5b", "group": "default", "namespace": "test", "dataId": "data-id2.yml", "md5": "4e22ae55a981aa1e934f08e71c9603ff"}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.