Skip to content

Commit cae8056

Browse files
committed
Add explicit schema for podTemplateSpec.metadata
Unknown metadata fields are pruned https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning If you change from v1beta CRDs to v1 CRDs the metadata field is pruned and the operator believes that every podSpec is incorrect. Related to kubernetes-sigs/controller-tools#448
1 parent 7fc1245 commit cae8056

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

config/crd/bases/apps.foundationdb.org_foundationdbbackups.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,23 @@ spec:
6565
podTemplateSpec:
6666
properties:
6767
metadata:
68+
properties:
69+
annotations:
70+
additionalProperties:
71+
type: string
72+
type: object
73+
finalizers:
74+
items:
75+
type: string
76+
type: array
77+
labels:
78+
additionalProperties:
79+
type: string
80+
type: object
81+
name:
82+
type: string
83+
namespace:
84+
type: string
6885
type: object
6986
spec:
7087
properties:

config/crd/bases/apps.foundationdb.org_foundationdbclusters.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -1522,6 +1522,23 @@ spec:
15221522
podTemplate:
15231523
properties:
15241524
metadata:
1525+
properties:
1526+
annotations:
1527+
additionalProperties:
1528+
type: string
1529+
type: object
1530+
finalizers:
1531+
items:
1532+
type: string
1533+
type: array
1534+
labels:
1535+
additionalProperties:
1536+
type: string
1537+
type: object
1538+
name:
1539+
type: string
1540+
namespace:
1541+
type: string
15251542
type: object
15261543
spec:
15271544
properties:
@@ -4368,6 +4385,23 @@ spec:
43684385
podTemplate:
43694386
properties:
43704387
metadata:
4388+
properties:
4389+
annotations:
4390+
additionalProperties:
4391+
type: string
4392+
type: object
4393+
finalizers:
4394+
items:
4395+
type: string
4396+
type: array
4397+
labels:
4398+
additionalProperties:
4399+
type: string
4400+
type: object
4401+
name:
4402+
type: string
4403+
namespace:
4404+
type: string
43714405
type: object
43724406
spec:
43734407
properties:

0 commit comments

Comments
 (0)