Skip to content

Commit

Permalink
Fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangpengcheng committed May 6, 2024
1 parent 09be565 commit c33c5b1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .ci/tests/integration/cases/mongodb-source/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
cpu: "0.1"
memory: 1G
sourceConfig:
mongodb.hosts: rs0/mongo-dbz-0.mongo.default.svc.cluster.local:27017,rs0/mongo-dbz-1.mongo.default.svc.cluster.local:27017,rs0/mongo-dbz-2.mongo.default.svc.cluster.local:27017
mongodb.hosts: rs0/mongo-dbz-0.mongo.default.svc.cluster.local:27017
mongodb.name: dbserver1
mongodb.user: debezium
mongodb.password: dbz
Expand Down
4 changes: 2 additions & 2 deletions .ci/tests/integration/cases/mongodb-source/mongodb-dbz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
matchLabels:
role: mongo
serviceName: "mongo"
replicas: 3
replicas: 1
template:
metadata:
labels:
Expand All @@ -44,7 +44,7 @@ spec:
terminationGracePeriodSeconds: 10
containers:
- name: mongo
image: debezium/example-mongodb:2.7
image: debezium/example-mongodb:2.6
env:
- name: MONGODB_USER
value: "debezium"
Expand Down
3 changes: 3 additions & 0 deletions controllers/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ func observeVPA(ctx context.Context, r client.Reader, name types.NamespacedName,
spec.UpdateVPAUpdatePolicy(updatePolicy, vpaSpec.ResourceUnit)
resourcePolicy := vpaSpec.ResourcePolicy
containerName := spec.GetVPAContainerName(&vpa.ObjectMeta)
if resourcePolicy == nil {
resourcePolicy = &vpav1.PodResourcePolicy{}
}
spec.UpdateResourcePolicy(resourcePolicy, containerName)
if !reflect.DeepEqual(updatePolicy, vpa.Spec.UpdatePolicy) ||
!reflect.DeepEqual(resourcePolicy, vpa.Spec.ResourcePolicy) {
Expand Down
3 changes: 3 additions & 0 deletions controllers/spec/vpa.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ func MakeVPA(objectMeta *metav1.ObjectMeta, targetRef *autov2.CrossVersionObject
objectMeta.Labels[LabelCustomResourceUnit] = "true"
}
resourcePolicy := vpa.ResourcePolicy
if resourcePolicy == nil {
resourcePolicy = &vpav1.PodResourcePolicy{}
}
UpdateResourcePolicy(resourcePolicy, containerName)

return &vpav1.VerticalPodAutoscaler{
Expand Down

0 comments on commit c33c5b1

Please sign in to comment.