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

built-in interpreter support statefulset #3009

Merged
merged 1 commit into from
Jan 3, 2023

Conversation

chaunceyjiang
Copy link
Member

Signed-off-by: chaunceyjiang [email protected]

What type of PR is this?
/kind feature

What this PR does / why we need it:

built-in interpreter support statefulset

Which issue(s) this PR fixes:
Fixes #3007

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

`karmada-controller-manager`: built-in interpreter support statefulset

@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 29, 2022
@karmada-bot karmada-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 29, 2022
@chaunceyjiang
Copy link
Member Author

Test image image
yaml pp.yaml
apiVersion: policy.karmada.io/v1alpha1
kind: PropagationPolicy
metadata:
  name: nginx-propagation
spec:
  resourceSelectors:
    - apiVersion: apps/v1
      kind: StatefulSet
      name: web
    - apiVersion: v1
      kind: Service
      name: nginx
  placement:
    clusterAffinity:
      clusterNames:
        - member1
        - member2
        - member3
    replicaScheduling:
      replicaDivisionPreference: Aggregated
      replicaSchedulingType: Divided

sts.yaml

apiVersion: v1
kind: Service
metadata:
  name: nginx
  labels:
    app: nginx
spec:
  ports:
  - port: 80
    name: web
  clusterIP: None
  selector:
    app: nginx
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: web
spec:
  selector:
    matchLabels:
      app: nginx # has to match .spec.template.metadata.labels
  serviceName: "nginx"
  replicas: 3 # by default is 1
  minReadySeconds: 10 # by default is 0
  template:
    metadata:
      labels:
        app: nginx # has to match .spec.selector.matchLabels
    spec:
      terminationGracePeriodSeconds: 10
      containers:
      - name: nginx
        image: registry.k8s.io/nginx-slim:0.8
        ports:
        - containerPort: 80
          name: web
        volumeMounts:
        - name: www
          mountPath: /usr/share/nginx/html
  volumeClaimTemplates:
  - metadata:
      name: www
    spec:
      accessModes: [ "ReadWriteOnce" ]
      storageClassName: "standard"
      resources:
        requests:
          storage: 100M

@codecov-commenter
Copy link

Codecov Report

Merging #3009 (58408c7) into master (617409f) will increase coverage by 0.02%.
The diff coverage is 25.00%.

@@            Coverage Diff             @@
##           master    #3009      +/-   ##
==========================================
+ Coverage   38.61%   38.64%   +0.02%     
==========================================
  Files         206      206              
  Lines       18808    18835      +27     
==========================================
+ Hits         7263     7278      +15     
- Misses      11115    11129      +14     
+ Partials      430      428       -2     
Flag Coverage Δ
unittests 38.64% <25.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../resourceinterpreter/defaultinterpreter/replica.go 0.00% <0.00%> (ø)
...rceinterpreter/defaultinterpreter/revisereplica.go 71.42% <83.33%> (+4.76%) ⬆️
pkg/util/worker.go 66.66% <0.00%> (-4.77%) ⬇️
pkg/scheduler/core/division_algorithm.go 85.71% <0.00%> (-0.38%) ⬇️
pkg/util/names/names.go 96.38% <0.00%> (-0.17%) ⬇️
pkg/util/namespace.go 100.00% <0.00%> (ø)
pkg/detector/detector.go 0.00% <0.00%> (ø)
pkg/scheduler/core/assignment.go 79.76% <0.00%> (ø)
pkg/controllers/status/workstatus_controller.go 0.00% <0.00%> (ø)
...scheduler/core/spreadconstraint/select_clusters.go 86.04% <0.00%> (+0.33%) ⬆️
... and 5 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@RainbowMango
Copy link
Member

/assign @XiShanYongYe-Chang

Copy link
Member

@XiShanYongYe-Chang XiShanYongYe-Chang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks~
/lgtm

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 30, 2022
@XiShanYongYe-Chang
Copy link
Member

Hi @WulixuanS, the current pr implements the basic functions for propagating StatefulSet, can you help take a look to see whether this implementation meets your requirements?

@XiShanYongYe-Chang
Copy link
Member

/approve

@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: XiShanYongYe-Chang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 3, 2023
@karmada-bot karmada-bot merged commit 9118be9 into karmada-io:master Jan 3, 2023
@XiShanYongYe-Chang
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

built-in interpreter support statefulset
5 participants