Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bindata/operator/managers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{ $leaseDuration := .LeaseDuration }}
{{ $renewDeadline := .RenewDeadline }}
{{ $retryPeriod := .RetryPeriod }}
{{ $managerMemoryLimit := .ManagerMemoryLimit }}
{{ range $operatorName, $operatorImage := .OperatorImages }}
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -62,7 +63,7 @@ spec:
resources:
limits:
cpu: 500m
memory: 256Mi
memory: '{{ $managerMemoryLimit }}'
requests:
cpu: 10m
memory: 128Mi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stuggi also, I think you would want to bump 'requests' too right?

Expand Down
2 changes: 1 addition & 1 deletion bindata/operator/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ spec:
resources:
limits:
cpu: 500m
memory: 256Mi
memory: '{{ .ManagerMemoryLimit }}'
requests:
cpu: 10m
memory: 128Mi
Expand Down
2 changes: 1 addition & 1 deletion bindata/operator/rabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
resources:
limits:
cpu: 200m
memory: 500Mi
memory: '{{ .ManagerMemoryLimit }}'
requests:
cpu: 5m
memory: 64Mi
Expand Down
2 changes: 1 addition & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ spec:
resources:
limits:
cpu: 500m
memory: 256Mi
memory: '{{ .ManagerMemoryLimit }}'
requests:
cpu: 10m
memory: 128Mi
Expand Down
2 changes: 2 additions & 0 deletions config/operator/deployment/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ spec:
value: 20
- name: RETRY_PERIOD
value: 5
- name: MANAGER_MEMORY_LIMIT
value: 512Mi
image: controller:latest
name: operator
securityContext:
Expand Down
3 changes: 2 additions & 1 deletion config/operator/managers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{ $leaseDuration := .LeaseDuration }}
{{ $renewDeadline := .RenewDeadline }}
{{ $retryPeriod := .RetryPeriod }}
{{ $managerMemoryLimit := .ManagerMemoryLimit }}
{{ range $operatorName, $operatorImage := .OperatorImages }}
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -62,7 +63,7 @@ spec:
resources:
limits:
cpu: 500m
memory: 256Mi
memory: '{{ $managerMemoryLimit }}'
requests:
cpu: 10m
memory: 128Mi
Expand Down
2 changes: 1 addition & 1 deletion config/operator/rabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
resources:
limits:
cpu: 200m
memory: 500Mi
memory: '{{ .ManagerMemoryLimit }}'
requests:
cpu: 5m
memory: 64Mi
Expand Down
5 changes: 4 additions & 1 deletion controllers/operator/openstack_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ var (
leaseDuration string
renewDeadline string
retryPeriod string
managerMemoryLimit string
)

// SetupEnv -
Expand Down Expand Up @@ -109,8 +110,9 @@ func SetupEnv() {
renewDeadline = envArr[1]
} else if envArr[0] == "RETRY_PERIOD" {
retryPeriod = envArr[1]
} else if envArr[0] == "MANAGER_MEMORY_LIMIT" {
managerMemoryLimit = envArr[1]
}

}
}

Expand Down Expand Up @@ -467,6 +469,7 @@ func (r *OpenStackReconciler) applyOperator(ctx context.Context, instance *opera
data.Data["LeaseDuration"] = leaseDuration
data.Data["RenewDeadline"] = renewDeadline
data.Data["RetryPeriod"] = retryPeriod
data.Data["ManagerMemoryLimit"] = managerMemoryLimit
data.Data["OpenStackServiceRelatedImages"] = envRelatedOpenStackServiceImages
return r.renderAndApply(ctx, instance, data, "operator", true)
}
Expand Down