Deployment spec properties are inadvertently removed when serializing
@Yash121l 已经在做这个了。
开始于 2026年9月13日。
评估
这个 Issue 还没有评估数据。
描述
Summary
Various valid deployment spec properties are seemingly wiped out when I load it into a V1DeploymentSpec object, make a small change, then re-serialize to a dict.
Details
I am extracting a V1DeploymentSpec from a ClusterServiceVersion manifest, making a small mutation to it, then re-serializing it and adding it back into the ClusterServiceVersion. This leads to multiple mutations that were not intended. See the following sequence of diffs (none of which were intended) for reference:
@@ -356,287 +355,126 @@
- selector:
- matchLabels:
- name: my-operator
+ selector: {}
...
spec:
- affinity:
- nodeAffinity:
- requiredDuringSchedulingIgnoredDuringExecution:
- nodeSelectorTerms:
- - matchExpressions:
- - key: kubernetes.io/arch
- operator: In
- values:
- - s390x
- - amd64
+ affinity: {}
...
- name: WATCH_NAMESPACE
- valueFrom:
- fieldRef:
- fieldPath: metadata.annotations['olm.targetNamespaces']
- name: POD_NAME
- valueFrom:
- fieldRef:
- fieldPath: metadata.name
...
- imagePullPolicy: Always
- livenessProbe:
- failureThreshold: 4
- httpGet:
- path: /healthz
- port: 8081
- initialDelaySeconds: 15
- periodSeconds: 15
- successThreshold: 1
- timeoutSeconds: 3
- readinessProbe:
- failureThreshold: 3
- httpGet:
- path: /healthz
- port: 8081
- initialDelaySeconds: 15
- periodSeconds: 15
- successThreshold: 1
- timeoutSeconds: 3
- 主要语言
- Python
- 星标
- 7.7k
- 派生
- 3.5k
- 平均合并
- 1 天 14 小时
- 30 天内合并 PR
- 18
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
kubernetes-client/python 的其他 Issue
-
kind/bug
难度 1/5 1 小时以内 新手友好度 68/100
kubernetes-client/python#2280 · 16 条评论 · 9 个 reaction ·
-
Release 1.37 未关闭
kubernetes-client/python#2691 · 1 条评论 · 1 个 reaction · 已指派 1 人 ·
-
help wanted
难度 5/5 一周以上 新手友好度 35/100
kubernetes-client/python#2677 · 11 条评论 · 1 个 reaction ·
-
help wanted kind/feature
kubernetes-client/python#2602 · 6 条评论 · 已指派 1 人 ·
-
kind/bug
kubernetes-client/python#2596 · 11 条评论 · 2 个 reaction · 已指派 1 人 ·
查看 kubernetes-client/python 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
-
bug
难度 2/5 1-3 小时 新手友好度 86/100
zostera/django-bootstrap4#894 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
use-agent-os/agent-os#3276 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
难度 2/5 1-3 小时 新手友好度 88/100
NousResearch/hermes-agent#117848 ·