Add interface to allow customize of operator deployments#1519
Conversation
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/eac61facff9d483c97892f6e1d86e681 ✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 12m 59s |
56f634e to
2971009
Compare
2971009 to
7ca4282
Compare
|
/retest |
Adds an interface which allows to customize the following
parameters of a controller-manager operator deployment
- change the replica (0/1)
- change the resources (requests/limits) of the manager container
It keeps the current default resource requests as is. For easier
gotemplate it this adds an internal custom struct type, which allows
to just loop over a list of operator.Operator for service operators
and a dedicated instance for the openstack-operator-controller-manager
and the rabbitmq-cluster-operator-manager.
E.g. changing the default cpu limits for the infra operator and
disabling the openstack-baremetal operator would be:
~~~
...
spec:
operatorOverrides:
- name: infra
controllerManager:
resources:
limits:
cpu: 600m
memory: 2Gi
replicas: 1
- name: openstack-baremetal
replicas: 0
~~~
To add a new service operator has the following high level steps:
- in the openstack_types.go api
- add a new const with the name
- add an entry for the defaults in the OperatorList var
- add the name also to the Enum of the OperatorSpec.Name
- (optional) if any specific env var need be passed to the operator,
e.g. related images list, or to enable webhooks, check the
applyOperator() in the openstack_controller.go .
Jira: OSPRH-17785
Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
7ca4282 to
ebdead0
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/b0b65590bc344a2095c2711ae15cbf52 ✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 14m 03s |
|
recheck |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dprince, stuggi The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
ce77ffb
into
openstack-k8s-operators:main
|
/cherry-pick 18.0-fr3 |
|
@stuggi: new pull request created: #1526 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
With [1] we can avoid disabling openstack init operator and just scale down the operators as needed, let's use it with run with webhook. [1] openstack-k8s-operators/openstack-operator#1519 Signed-off-by: Yatin Karel <ykarel@redhat.com>
Adds an interface which allows to customize the following parameters of a controller-manager operator deployment
It keeps the current default resource requests as is. For easier gotemplate it this adds an internal custom struct type, which allows to just loop over a list of operator.Operator for service operators and a dedicated instance for the openstack-operator-controller-manager and the rabbitmq-cluster-operator-manager.
E.g. changing the default cpu limits for the infra operator and disabling the openstack-baremetal operator would be:
To add a new service operator has the following high level steps:
openstack_types.goapiopenstack_controller.go.Jira: OSPRH-17785