Comments (4)
I ran into the same phenomenon.
Surely it is because the current implementation of the deployment-splitter
controller detects the diff in and update the Status
only. (pkg/reconciler/deployment/controller.go
)
if !equality.Semantic.DeepEqual(previous.Status, current.Status) {
_, uerr := c.client.Deployments(current.Namespace).UpdateStatus(ctx, current, metav1.UpdateOptions{})
return uerr
}
On the other hand, in the case of a single downstream cluster, its reconciliation loop only adds a label cluater: your-cluster-name
(pkg/reconciler/deployment/deployment.go
)
if len(cls) == 1 {
// nothing to split, just label Deployment for the only cluster.
if root.Labels == nil {
root.Labels = map[string]string{}
}
// TODO: munge cluster name
root.Labels[clusterLabel] = cls[0].Name
return nil
}
As a result, the deployment is not labelled and thus the corresponding syncer cannot detect the creation.
from kcp.
Why did the clustername in the deployment is always admin
?
Guangyas-MacBook-Pro:kcp guangyaliu$ kubectl get deploy -oyaml
apiVersion: v1
items:
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{},"name":"example","namespace":"default"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"nginx"}},"template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":[{"command":["/bin/sh","-ec","echo \"Going to sleep\"\ntail -f /dev/null \n"],"image":"busybox:1.25","name":"busybox"}]}}}}
clusterName: admin
...
from kcp.
Even if I change the cluster name to admin
, the deployment still cannot sync to downstream cluster.
Guangyas-MacBook-Pro:kcp guangyaliu$ kubectl get cluster
NAME AGE
admin 86s
from kcp.
@y-taka-23 As a simple fix, how about just remove the checking of if len(cls) == 1
,
from kcp.
Related Issues (20)
- Community Meeting September 14, 2023 HOT 2
- bug: `kubectl-ws '~'` changes hostname used in kubeconfig server URL HOT 10
- Community Meeting September 28, 2023 HOT 3
- bug: leaking memory and goroutines HOT 8
- Pointer: NFD Feature request for MultiCluster environments HOT 1
- bug: no v0.21.0 image published HOT 2
- bug: High CPU and memory consumption HOT 4
- bug: Wire in dev certificate for mounts in `kcp start` HOT 7
- epic: Kubernetes 1.30
- feature: add kcp-controller-manager standalone binary
- bug: Use kcp start command HOT 1
- bug: ServiceAccount token access leak HOT 2
- bug: ws tree does not work for home clusters HOT 1
- feature: move mounts to use index
- feature: add `kubectl ws -i` HOT 7
- epic: 2024-03-25 archived PRs from TMC or out of scope
- feature: Need Documentation for KCP Installation HOT 2
- A potential risk in kcp that could lead to takeover of the clusterfeature: HOT 1
- checksum of pre built binaries didn't match at v0.24.0 HOT 8
- bug: ServiceAccounts need `access` permission on their "home" workspace to pass front-proxy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kcp.