Skip to content

Commit 9b86944

Browse files
authored
fix: do not enfore replicas by controller (#372)
1 parent 76ef30f commit 9b86944

File tree

5 files changed

+339
-92
lines changed

5 files changed

+339
-92
lines changed

chart/swagger-hub-controller/crds/swagger.infra.doodle.com_swaggerhubs.yaml

Lines changed: 65 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2079,8 +2079,9 @@ spec:
20792079
type: integer
20802080
type: object
20812081
resizePolicy:
2082-
description: Resources resize policy for the
2083-
container.
2082+
description: |-
2083+
Resources resize policy for the container.
2084+
This field cannot be set on ephemeral containers.
20842085
items:
20852086
description: ContainerResizePolicy represents
20862087
resource resize policy for the container.
@@ -5368,8 +5369,9 @@ spec:
53685369
type: integer
53695370
type: object
53705371
resizePolicy:
5371-
description: Resources resize policy for the
5372-
container.
5372+
description: |-
5373+
Resources resize policy for the container.
5374+
This field cannot be set on ephemeral containers.
53735375
items:
53745376
description: ContainerResizePolicy represents
53755377
resource resize policy for the container.
@@ -6164,8 +6166,8 @@ spec:
61646166
will be made available to those containers which consume them
61656167
by name.
61666168

6167-
This is an alpha field and requires enabling the
6168-
DynamicResourceAllocation feature gate.
6169+
This is a stable field but requires that the
6170+
DynamicResourceAllocation feature gate is enabled.
61696171

61706172
This field is immutable.
61716173
items:
@@ -6625,9 +6627,10 @@ spec:
66256627
operator:
66266628
description: |-
66276629
Operator represents a key's relationship to the value.
6628-
Valid operators are Exists and Equal. Defaults to Equal.
6630+
Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal.
66296631
Exists is equivalent to wildcard for value, so that a pod can
66306632
tolerate all taints of a particular category.
6633+
Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators).
66316634
type: string
66326635
tolerationSeconds:
66336636
description: |-
@@ -7432,7 +7435,7 @@ spec:
74327435
resources:
74337436
description: |-
74347437
resources represents the minimum resources the volume should have.
7435-
If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements
7438+
Users are allowed to specify resource requirements
74367439
that are lower than previous value but must still be higher than capacity recorded in the
74377440
status field of the claim.
74387441
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
@@ -8342,6 +8345,24 @@ spec:
83428345
CSRs will be addressed to this
83438346
signer.
83448347
type: string
8348+
userAnnotations:
8349+
additionalProperties:
8350+
type: string
8351+
description: |-
8352+
userAnnotations allow pod authors to pass additional information to
8353+
the signer implementation. Kubernetes does not restrict or validate this
8354+
metadata in any way.
8355+
8356+
These values are copied verbatim into the `spec.unverifiedUserAnnotations` field of
8357+
the PodCertificateRequest objects that Kubelet creates.
8358+
8359+
Entries are subject to the same validation as object metadata annotations,
8360+
with the addition that all keys must be domain-prefixed. No restrictions
8361+
are placed on values, except an overall size limitation on the entire field.
8362+
8363+
Signers should document the keys and values they support. Signers should
8364+
deny requests that contain keys they do not recognize.
8365+
type: object
83458366
required:
83468367
- keyType
83478368
- signerName
@@ -8774,6 +8795,42 @@ spec:
87748795
x-kubernetes-list-map-keys:
87758796
- name
87768797
x-kubernetes-list-type: map
8798+
workloadRef:
8799+
description: |-
8800+
WorkloadRef provides a reference to the Workload object that this Pod belongs to.
8801+
This field is used by the scheduler to identify the PodGroup and apply the
8802+
correct group scheduling policies. The Workload object referenced
8803+
by this field may not exist at the time the Pod is created.
8804+
This field is immutable, but a Workload object with the same name
8805+
may be recreated with different policies. Doing this during pod scheduling
8806+
may result in the placement not conforming to the expected policies.
8807+
properties:
8808+
name:
8809+
description: |-
8810+
Name defines the name of the Workload object this Pod belongs to.
8811+
Workload must be in the same namespace as the Pod.
8812+
If it doesn't match any existing Workload, the Pod will remain unschedulable
8813+
until a Workload object is created and observed by the kube-scheduler.
8814+
It must be a DNS subdomain.
8815+
type: string
8816+
podGroup:
8817+
description: |-
8818+
PodGroup is the name of the PodGroup within the Workload that this Pod
8819+
belongs to. If it doesn't match any existing PodGroup within the Workload,
8820+
the Pod will remain unschedulable until the Workload object is recreated
8821+
and observed by the kube-scheduler. It must be a DNS label.
8822+
type: string
8823+
podGroupReplicaKey:
8824+
description: |-
8825+
PodGroupReplicaKey specifies the replica key of the PodGroup to which this
8826+
Pod belongs. It is used to distinguish pods belonging to different replicas
8827+
of the same pod group. The pod group policy is applied separately to each replica.
8828+
When set, it must be a DNS label.
8829+
type: string
8830+
required:
8831+
- name
8832+
- podGroup
8833+
type: object
87778834
required:
87788835
- containers
87798836
type: object

config/base/crd/bases/swagger.infra.doodle.com_swaggerhubs.yaml

Lines changed: 65 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2079,8 +2079,9 @@ spec:
20792079
type: integer
20802080
type: object
20812081
resizePolicy:
2082-
description: Resources resize policy for the
2083-
container.
2082+
description: |-
2083+
Resources resize policy for the container.
2084+
This field cannot be set on ephemeral containers.
20842085
items:
20852086
description: ContainerResizePolicy represents
20862087
resource resize policy for the container.
@@ -5368,8 +5369,9 @@ spec:
53685369
type: integer
53695370
type: object
53705371
resizePolicy:
5371-
description: Resources resize policy for the
5372-
container.
5372+
description: |-
5373+
Resources resize policy for the container.
5374+
This field cannot be set on ephemeral containers.
53735375
items:
53745376
description: ContainerResizePolicy represents
53755377
resource resize policy for the container.
@@ -6164,8 +6166,8 @@ spec:
61646166
will be made available to those containers which consume them
61656167
by name.
61666168

6167-
This is an alpha field and requires enabling the
6168-
DynamicResourceAllocation feature gate.
6169+
This is a stable field but requires that the
6170+
DynamicResourceAllocation feature gate is enabled.
61696171

61706172
This field is immutable.
61716173
items:
@@ -6625,9 +6627,10 @@ spec:
66256627
operator:
66266628
description: |-
66276629
Operator represents a key's relationship to the value.
6628-
Valid operators are Exists and Equal. Defaults to Equal.
6630+
Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal.
66296631
Exists is equivalent to wildcard for value, so that a pod can
66306632
tolerate all taints of a particular category.
6633+
Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators).
66316634
type: string
66326635
tolerationSeconds:
66336636
description: |-
@@ -7432,7 +7435,7 @@ spec:
74327435
resources:
74337436
description: |-
74347437
resources represents the minimum resources the volume should have.
7435-
If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements
7438+
Users are allowed to specify resource requirements
74367439
that are lower than previous value but must still be higher than capacity recorded in the
74377440
status field of the claim.
74387441
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
@@ -8342,6 +8345,24 @@ spec:
83428345
CSRs will be addressed to this
83438346
signer.
83448347
type: string
8348+
userAnnotations:
8349+
additionalProperties:
8350+
type: string
8351+
description: |-
8352+
userAnnotations allow pod authors to pass additional information to
8353+
the signer implementation. Kubernetes does not restrict or validate this
8354+
metadata in any way.
8355+
8356+
These values are copied verbatim into the `spec.unverifiedUserAnnotations` field of
8357+
the PodCertificateRequest objects that Kubelet creates.
8358+
8359+
Entries are subject to the same validation as object metadata annotations,
8360+
with the addition that all keys must be domain-prefixed. No restrictions
8361+
are placed on values, except an overall size limitation on the entire field.
8362+
8363+
Signers should document the keys and values they support. Signers should
8364+
deny requests that contain keys they do not recognize.
8365+
type: object
83458366
required:
83468367
- keyType
83478368
- signerName
@@ -8774,6 +8795,42 @@ spec:
87748795
x-kubernetes-list-map-keys:
87758796
- name
87768797
x-kubernetes-list-type: map
8798+
workloadRef:
8799+
description: |-
8800+
WorkloadRef provides a reference to the Workload object that this Pod belongs to.
8801+
This field is used by the scheduler to identify the PodGroup and apply the
8802+
correct group scheduling policies. The Workload object referenced
8803+
by this field may not exist at the time the Pod is created.
8804+
This field is immutable, but a Workload object with the same name
8805+
may be recreated with different policies. Doing this during pod scheduling
8806+
may result in the placement not conforming to the expected policies.
8807+
properties:
8808+
name:
8809+
description: |-
8810+
Name defines the name of the Workload object this Pod belongs to.
8811+
Workload must be in the same namespace as the Pod.
8812+
If it doesn't match any existing Workload, the Pod will remain unschedulable
8813+
until a Workload object is created and observed by the kube-scheduler.
8814+
It must be a DNS subdomain.
8815+
type: string
8816+
podGroup:
8817+
description: |-
8818+
PodGroup is the name of the PodGroup within the Workload that this Pod
8819+
belongs to. If it doesn't match any existing PodGroup within the Workload,
8820+
the Pod will remain unschedulable until the Workload object is recreated
8821+
and observed by the kube-scheduler. It must be a DNS label.
8822+
type: string
8823+
podGroupReplicaKey:
8824+
description: |-
8825+
PodGroupReplicaKey specifies the replica key of the PodGroup to which this
8826+
Pod belongs. It is used to distinguish pods belonging to different replicas
8827+
of the same pod group. The pod group policy is applied separately to each replica.
8828+
When set, it must be a DNS label.
8829+
type: string
8830+
required:
8831+
- name
8832+
- podGroup
8833+
type: object
87778834
required:
87788835
- containers
87798836
type: object

config/rbac/role.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ rules:
77
- apiGroups:
88
- ""
99
resources:
10-
- configmaps
10+
- events
11+
verbs:
12+
- create
13+
- patch
14+
- apiGroups:
15+
- ""
16+
resources:
1117
- services
1218
verbs:
1319
- delete
@@ -16,13 +22,6 @@ rules:
1622
- patch
1723
- update
1824
- watch
19-
- apiGroups:
20-
- ""
21-
resources:
22-
- events
23-
verbs:
24-
- create
25-
- patch
2625
- apiGroups:
2726
- apps
2827
resources:

0 commit comments

Comments
 (0)