Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate spec.storageRequest via validation webhook #234

Conversation

stuggi
Copy link
Contributor

@stuggi stuggi commented Jun 24, 2024

Notify the enduser if the configured DB storageRequest is too low for production use. It is not blocking to allow lower settings for test/ci systems. The output would be like:

$ oc apply -n openstack -f core_v1beta1_openstackcontrolplane_galera_network_isolation_3replicas.yaml
Warning: spec.galera.template[openstack-cell1].storageRequest: 1G is not appropriate for production! For production use at least 5G!
Warning: spec.galera.template[openstack].storageRequest: 500M is not appropriate for production! For production use at least 5G!

Depends-On: openstack-k8s-operators/lib-common#522

@openshift-ci openshift-ci bot requested review from dciabrin and viroel June 24, 2024 12:18
stuggi added a commit to stuggi/openstack-operator that referenced this pull request Jun 24, 2024
Notify the enduser if the configured DB storageRequest is
too low for production use. It is not blocking to allow lower
settings for test/ci systems. The output would be like:

$ oc apply -n openstack -f core_v1beta1_openstackcontrolplane_galera_network_isolation_3replicas.yaml
Warning: Note! spec.galera.template[openstack-cell1].storageRequest: 1G is not appropriate for production! For production use at least 5G!
Warning: Note! spec.galera.template[openstack].storageRequest: 500M is not appropriate for production! For production use at least 5G!

Depends-On: openstack-k8s-operators/lib-common#522
Depends-On: openstack-k8s-operators/mariadb-operator#234

Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
@stuggi stuggi requested review from zzzeek and abays and removed request for viroel June 24, 2024 12:41
@stuggi stuggi force-pushed the storage_request_webhook branch from 6443895 to 7f344bb Compare June 24, 2024 12:57
stuggi added a commit to stuggi/openstack-operator that referenced this pull request Jun 24, 2024
Notify the enduser if the configured DB storageRequest is
too low for production use. It is not blocking to allow lower
settings for test/ci systems. The output would be like:

$ oc apply -n openstack -f core_v1beta1_openstackcontrolplane_galera_network_isolation_3replicas.yaml
Warning: spec.galera.template[openstack-cell1].storageRequest: 1G is not appropriate for production! For production use at least 5G!
Warning: spec.galera.template[openstack].storageRequest: 500M is not appropriate for production! For production use at least 5G!

Depends-On: openstack-k8s-operators/lib-common#522
Depends-On: openstack-k8s-operators/mariadb-operator#234

Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
Copy link
Contributor

@abays abays left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

openshift-ci bot commented Jun 24, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abays, stuggi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Notify the enduser if the configured DB storageRequest is
too low for production use. It is not blocking to allow lower
settings for test/ci systems. The output would be like:

$ oc apply -n openstack -f core_v1beta1_openstackcontrolplane_galera_network_isolation_3replicas.yaml
Warning: spec.galera.template[openstack-cell1].storageRequest: 1G is not appropriate for production! For production use at least 5G!
Warning: spec.galera.template[openstack].storageRequest: 500M is not appropriate for production! For production use at least 5G!

Depends-On: openstack-k8s-operators/lib-common#522

Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
@stuggi stuggi force-pushed the storage_request_webhook branch from 7f344bb to 954593f Compare June 24, 2024 13:29
@openshift-ci openshift-ci bot removed the lgtm label Jun 24, 2024
Copy link
Contributor

openshift-ci bot commented Jun 24, 2024

New changes are detected. LGTM label has been removed.

@abays abays added the lgtm label Jun 24, 2024
@dciabrin
Copy link
Contributor

/lgtm

@openshift-merge-bot openshift-merge-bot bot merged commit 414cc98 into openstack-k8s-operators:main Jun 24, 2024
6 checks passed
stuggi added a commit to stuggi/openstack-operator that referenced this pull request Jun 24, 2024
Notify the enduser if the configured DB storageRequest is
too low for production use. It is not blocking to allow lower
settings for test/ci systems. The output would be like:

$ oc apply -n openstack -f core_v1beta1_openstackcontrolplane_galera_network_isolation_3replicas.yaml
Warning: spec.galera.template[openstack-cell1].storageRequest: 1G is not appropriate for production! For production use at least 5G!
Warning: spec.galera.template[openstack].storageRequest: 500M is not appropriate for production! For production use at least 5G!

Depends-On: openstack-k8s-operators/lib-common#522
Depends-On: openstack-k8s-operators/mariadb-operator#234

Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
stuggi added a commit to stuggi/openstack-operator that referenced this pull request Jun 24, 2024
Notify the enduser if the configured DB storageRequest is
too low for production use. It is not blocking to allow lower
settings for test/ci systems. The output would be like:

$ oc apply -n openstack -f core_v1beta1_openstackcontrolplane_galera_network_isolation_3replicas.yaml
Warning: spec.galera.template[openstack-cell1].storageRequest: 1G is not appropriate for production! For production use at least 5G!
Warning: spec.galera.template[openstack].storageRequest: 500M is not appropriate for production! For production use at least 5G!

Depends-On: openstack-k8s-operators/lib-common#522
Depends-On: openstack-k8s-operators/mariadb-operator#234

Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants