Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when apply an exist deployment, return error #174

Closed
silenceper opened this issue Nov 4, 2021 · 1 comment · Fixed by #178
Closed

when apply an exist deployment, return error #174

silenceper opened this issue Nov 4, 2021 · 1 comment · Fixed by #178
Labels
kind/bug Something isn't working

Comments

@silenceper
Copy link
Member

silenceper commented Nov 4, 2021

What happened:

when apply an exist deployment, return error

Error from server (NotFound): error when applying patch:
{"metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"labels\":{\"clusternet-app\":\"multi-cluster-nginx\"},\"name\":\"my-nginx\",\"namespace\":\"foo\"},\"spec\":{\"replicas\":1,\"selector\":{\"matchLabels\":{\"app\":\"nginx\"}},\"template\":{\"metadata\":{\"labels\":{\"app\":\"nginx\"}},\"spec\":{\"containers\":[{\"image\":\"nginx:1.14.2\",\"name\":\"nginx\",\"ports\":[{\"containerPort\":80}]}]}}}}\n"},"labels":{"aa":null}},"spec":{"template":{"spec":{"containers":[{"image":"nginx:1.14.2","name":"nginx","ports":[{"containerPort":80}]}]}}}}
to:
Resource: "apps/v1, Resource=deployments", GroupVersionKind: "apps/v1, Kind=Deployment"
Name: "my-nginx", Namespace: "foo"
for: "nginx-deployment-foo.yaml": deployments.shadow "my-nginx" not found
kubectl clusternet apply -f deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-nginx
  namespace: foo
  labels:
    clusternet-app: multi-cluster-nginx
spec:
  selector:
    matchLabels:
      app: nginx
  replicas: 1
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
        - name: nginx
          image: nginx:1.14.2
          ports:
            - containerPort: 80

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Clusternet version:
    • Clusternet-agent version (user clusternet-agent --version=json):
    • Clusternet-hub version (user clusternet-hub --version=json):
{
  "programName": "clusternet-hub",
  "major": "0",
  "minor": "5+",
  "gitVersion": "v0.5.0-11-g6112b08",
  "gitCommit": "6112b08eb21357e669f3f390b2eea56ab729d72e",
  "gitTreeState": "clean",
  "buildDate": "2021-11-03T08:05:21Z",
  "goVersion": "go1.14.15",
  "compiler": "gc",
  "platform": "linux/amd64"
}
  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Others:
@silenceper silenceper added the kind/bug Something isn't working label Nov 4, 2021
@silenceper
Copy link
Member Author

silenceper commented Nov 4, 2021

It seems that the PATCH error caused by this pr #170

silenceper added a commit to silenceper/clusternet that referenced this issue Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant