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

create pp-1 and pp-2 at first,then create a matched deployment,then delete pp-1,does the deployment can auto match to pp-2 ? #3982

Closed
chaosi-zju opened this issue Aug 23, 2023 · 7 comments
Assignees
Labels
kind/question Indicates an issue that is a support question.

Comments

@chaosi-zju
Copy link
Member

chaosi-zju commented Aug 23, 2023

Please provide an in-depth description of the question you have:

  1. create pp-1 (preemption: Always, priority: 5) 和 pp-2 (preemption: Never, priority: 5)
  2. then create a matched deployment
  3. then delete pp-1

does the deployment can auto re-match to pp-2,why? (Both matching and non matching situations have occurred due to user feedback)

apiVersion: policy.karmada.io/v1alpha1
kind: PropagationPolicy
metadata:
  name: dp-test-pp1
  namespace: namespace-lijunhui
spec:
  resourceSelectors:
    - apiVersion: apps/v1
      kind: Deployment
      namespace: namespace-lijunhui
      name: dp-test-pp
    - apiVersion: v1
      kind: Service
      namespace: namespace-lijunhui
      name: test-svc-01
  placement:
    clusterAffinity:
      clusterNames:
        - ljh-turbo-123
    clusterTolerations:
      - key: cluster.karmada.io/not-ready
        operator: Exists
        effect: NoExecute
        tolerationSeconds: 300
      - key: cluster.karmada.io/unreachable
        operator: Exists
        effect: NoExecute
        tolerationSeconds: 300
    replicaScheduling:
        replicaSchedulingType: Duplicated
  preemption: Always
  priority: 5
apiVersion: policy.karmada.io/v1alpha1
kind: PropagationPolicy
metadata:
  name: dp-test-pp2
  namespace: namespace-lijunhui
spec:
  resourceSelectors:
    - apiVersion: apps/v1
      kind: Deployment
      namespace: namespace-lijunhui
      name: dp-test-pp
  placement:
    clusterAffinity:
      clusterNames:
        - turbo6
    clusterTolerations:
      - key: cluster.karmada.io/not-ready
        operator: Exists
        effect: NoExecute
        tolerationSeconds: 300
      - key: cluster.karmada.io/unreachable
        operator: Exists
        effect: NoExecute
        tolerationSeconds: 300
    replicaScheduling:
        replicaSchedulingType: Duplicated
  preemption: Never
  priority: 5
kind: Deployment
apiVersion: apps/v1
metadata:
  name: dp-test-pp
  namespace: namespace-lijunhui
  labels:
    app: dp-test-pp
spec:
  replicas: 1
  selector:
    matchLabels:
      app: dp-test-pp
  template:
    metadata:
      labels:
        app: dp-test-pp
    spec:
      containers:
        - name: container-1
          image: swr.cn-north-7.myhuaweicloud.com/image1/nginx:multiport
          env:
            - name: PAAS_APP_NAME
              value: mcp-nginx2
            - name: PAAS_NAMESPACE
              value: default
            - name: PAAS_PROJECT_ID
              value: 6273e04835934c0dbb47c1e7b6f5625f
          resources:
            limits:
              cpu: 10m
              memory: 15Mi
            requests:
              cpu: 10m
              memory: 15Mi
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
      securityContext: {}
      schedulerName: default-scheduler
      tolerations:
        - key: node.kubernetes.io/not-ready
          operator: Exists
          effect: NoExecute
          tolerationSeconds: 300
        - key: node.kubernetes.io/unreachable
          operator: Exists
          effect: NoExecute
          tolerationSeconds: 300
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%
      maxSurge: 25%
  revisionHistoryLimit: 10
  progressDeadlineSeconds: 600

What do you think about this question?:

Environment:

  • Karmada version:
  • Kubernetes version:
  • Others:
@chaosi-zju chaosi-zju added the kind/question Indicates an issue that is a support question. label Aug 23, 2023
@chaosi-zju
Copy link
Member Author

/assign

@chaosi-zju
Copy link
Member Author

chaosi-zju commented Aug 23, 2023

b1b5fd96dc69259733acf49c8a7a371

After test,the result can auto re-match to pp-2 !

@whitewindmills
Copy link
Member

我想你面临的是这个问题 #3878

@chaosi-zju
Copy link
Member Author

chaosi-zju commented Aug 23, 2023

我想你面临的是这个问题 #3878

Great finding to me! This is just why user feedback pp-2 not auto matched in his environment!

Thank you~

@chaosi-zju chaosi-zju changed the title 先创建 pp-1 和 pp-2,再创建 deploy,再删除 pp-1,deploy 是否会自动 match 到 pp-2 ? create pp-1 and pp-2 at first,then create a matched deployment,then delete pp-1,does the deployment can auto match pp-2 ? Aug 24, 2023
@chaosi-zju
Copy link
Member Author

The reason for some user feedback no auto match is that his version is v1.7.0-alpha.3 or lower, these version doesn't contain the commit of #3878.

@chaosi-zju
Copy link
Member Author

/close

@karmada-bot
Copy link
Collaborator

@chaosi-zju: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@chaosi-zju chaosi-zju changed the title create pp-1 and pp-2 at first,then create a matched deployment,then delete pp-1,does the deployment can auto match pp-2 ? create pp-1 and pp-2 at first,then create a matched deployment,then delete pp-1,does the deployment can auto match to pp-2 ? Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

3 participants