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
feat: Add a lua string and math lib to the resource interpreter. #3256
Conversation
inpt.yaml apiVersion: config.karmada.io/v1alpha1
kind: ResourceInterpreterCustomization
metadata:
name: declarative-configuration-example
spec:
target:
apiVersion: v1
kind: Service
customizations:
statusReflection:
luaScript: >
function ReflectStatus (observedObj)
print(string.len("abc"))
return observedObj.status
end
apiVersion: v1
kind: Service
metadata:
creationTimestamp: "2023-03-06T12:24:10Z"
labels:
component: apiserver
provider: kubernetes
name: kubernetes
namespace: default
resourceVersion: "190"
uid: 79febb3b-af42-4e83-aa4f-9095112771fb
spec:
clusterIP: 10.96.0.1
clusterIPs:
- 10.96.0.1
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: https
port: 443
protocol: TCP
targetPort: 5443
sessionAffinity: None
type: ClusterIP
status:
loadBalancer:
ingress:
- ip: 172.1.1.1
- ip: 192.1.3.2
|
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #3256 +/- ##
==========================================
+ Coverage 49.15% 49.18% +0.03%
==========================================
Files 206 206
Lines 18377 18390 +13
==========================================
+ Hits 9033 9045 +12
Misses 8857 8857
- Partials 487 488 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
ff4fce8
to
43be674
Compare
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
43be674
to
c395519
Compare
Please take a look. |
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
/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 cherry-pick this patch to the previous branch? In addition, components |
…#3256-origin-release-1.5 Automated cherry pick of #3256: feat: add string and math lib for lua
…#3256-origin-release-1.4 Automated cherry pick of #3256: feat: add string and math lib for lua
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #3247
Special notes for your reviewer:
Does this PR introduce a user-facing change?: