-
Notifications
You must be signed in to change notification settings - Fork 917
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
Conversation
Signed-off-by: chaunceyjiang <[email protected]>
yamlpp.yamlapiVersion: 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 Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
/assign @XiShanYongYe-Chang |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks~
/lgtm
Hi @WulixuanS, the current pr implements the basic functions for propagating |
/approve |
[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 |
Hi @chaunceyjiang, can you help update the document in the website: https://karmada.io/docs/userguide/globalview/customizing-resource-interpreter/#built-in-interpreter |
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?: