Skip to content

Commit 349eaa9

Browse files
Add a DisableDefaultAffinity field to PodPolicy
1 parent e3ccfdc commit 349eaa9

16 files changed

+43
-34
lines changed

.ci/tests/integration/cases/global-and-namespaced-config/manifests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ spec:
1616
- persistent://public/default/input-java-topic
1717
typeClassName: java.lang.String
1818
pod:
19+
disableDefaultAffinity: true
1920
env:
2021
- name: "podenv"
2122
value: "podvalue"

.ci/tests/integration/e2e_with_tls.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ setup:
3131
image="function-mesh-operator:latest"
3232
IMG=${image} make docker-build-skip-test
3333
kind load docker-image ${image}
34-
helm install ${FUNCTION_MESH_RELEASE_NAME} -n ${FUNCTION_MESH_NAMESPACE} --set operatorImage=${image} --set controllerManager.globalBackendConfig=global-backend-config --set controllerManager.globalBackendConfigNamespace=${FUNCTION_MESH_NAMESPACE} --set controllerManager.namespacedBackendConfig=backend-config --set controllerManager.addDefaultAffinity=false --create-namespace charts/function-mesh-operator
34+
helm install ${FUNCTION_MESH_RELEASE_NAME} -n ${FUNCTION_MESH_NAMESPACE} --set operatorImage=${image} --set controllerManager.globalBackendConfig=global-backend-config --set controllerManager.globalBackendConfigNamespace=${FUNCTION_MESH_NAMESPACE} --set controllerManager.namespacedBackendConfig=backend-config --create-namespace charts/function-mesh-operator
3535
wait:
3636
- namespace: function-mesh
3737
resource: pod

api/compute/v1alpha1/common.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ type PodPolicy struct {
227227
Env []corev1.EnvVar `json:"env,omitempty"`
228228

229229
Liveness *Liveness `json:"liveness,omitempty"`
230+
231+
DisableDefaultAffinity bool `json:"disableDefaultAffinity,omitempty"`
230232
}
231233

232234
type Runtime struct {

charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-backendconfigs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,8 @@ spec:
828828
items:
829829
type: string
830830
type: array
831+
disableDefaultAffinity:
832+
type: boolean
831833
env:
832834
items:
833835
properties:

charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functionmeshes.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,6 +1127,8 @@ spec:
11271127
items:
11281128
type: string
11291129
type: array
1130+
disableDefaultAffinity:
1131+
type: boolean
11301132
env:
11311133
items:
11321134
properties:
@@ -5004,6 +5006,8 @@ spec:
50045006
items:
50055007
type: string
50065008
type: array
5009+
disableDefaultAffinity:
5010+
type: boolean
50075011
env:
50085012
items:
50095013
properties:
@@ -8662,6 +8666,8 @@ spec:
86628666
items:
86638667
type: string
86648668
type: array
8669+
disableDefaultAffinity:
8670+
type: boolean
86658671
env:
86668672
items:
86678673
properties:

charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
{{- if eq .Values.admissionWebhook.certificate.provider "cert-manager" }}
77
{{- include "function-mesh-operator.certManager.annotation" . | nindent 4 -}}
88
{{- end }}
9-
controller-gen.kubebuilder.io/version: v0.9.2
9+
controller-gen.kubebuilder.io/version: v0.15.0
1010
name: functions.compute.functionmesh.io
1111
spec:
1212
conversion:
@@ -1146,6 +1146,8 @@ spec:
11461146
items:
11471147
type: string
11481148
type: array
1149+
disableDefaultAffinity:
1150+
type: boolean
11491151
env:
11501152
items:
11511153
properties:

charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sinks.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,8 @@ spec:
10671067
items:
10681068
type: string
10691069
type: array
1070+
disableDefaultAffinity:
1071+
type: boolean
10701072
env:
10711073
items:
10721074
properties:

charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sources.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,8 @@ spec:
10621062
items:
10631063
type: string
10641064
type: array
1065+
disableDefaultAffinity:
1066+
type: boolean
10651067
env:
10661068
items:
10671069
properties:

config/crd/bases/compute.functionmesh.io_backendconfigs.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.9.2
7-
creationTimestamp: null
6+
controller-gen.kubebuilder.io/version: v0.15.0
87
name: backendconfigs.compute.functionmesh.io
98
spec:
109
group: compute.functionmesh.io
@@ -807,6 +806,8 @@ spec:
807806
items:
808807
type: string
809808
type: array
809+
disableDefaultAffinity:
810+
type: boolean
810811
env:
811812
items:
812813
properties:

config/crd/bases/compute.functionmesh.io_functionmeshes.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.9.2
7-
creationTimestamp: null
6+
controller-gen.kubebuilder.io/version: v0.15.0
87
name: functionmeshes.compute.functionmesh.io
98
spec:
109
group: compute.functionmesh.io
@@ -1128,6 +1127,8 @@ spec:
11281127
items:
11291128
type: string
11301129
type: array
1130+
disableDefaultAffinity:
1131+
type: boolean
11311132
env:
11321133
items:
11331134
properties:
@@ -5005,6 +5006,8 @@ spec:
50055006
items:
50065007
type: string
50075008
type: array
5009+
disableDefaultAffinity:
5010+
type: boolean
50085011
env:
50095012
items:
50105013
properties:
@@ -8663,6 +8666,8 @@ spec:
86638666
items:
86648667
type: string
86658668
type: array
8669+
disableDefaultAffinity:
8670+
type: boolean
86668671
env:
86678672
items:
86688673
properties:

0 commit comments

Comments
 (0)