Skip to content

Allow postprocessing filters to be disabled#155

Merged
simu merged 3 commits into
masterfrom
postprocess-optional-disable
Aug 3, 2020
Merged

Allow postprocessing filters to be disabled#155
simu merged 3 commits into
masterfrom
postprocess-optional-disable

Conversation

@simu

@simu simu commented Jul 31, 2020

Copy link
Copy Markdown
Member

It can be helpful to make postprocessing components optional based on a reclass reference.

This PR implements this feature by introducing an optional field enabled for each filter definition. If the field doesn't exist, filters will count as enabled. This feature is particularly useful if we want to apply a filter to a subchart of a Helm chart which can be enabled or disabled, e.g. Postgres for Keycloak.

The PR also introduces a first set of tests for postprocess_components.

Checklist

  • Keep pull requests small so they can be easily reviewed.
  • Update tests.
  • Update the ./CHANGELOG.md.

@simu simu requested a review from srueg July 31, 2020 14:38
simu added a commit to projectsyn/component-keycloak that referenced this pull request Jul 31, 2020
The current implementation allows configuring the following aspects of
Keycloak:
* The public hostname using either ingress or route
* An initial admin user
* Keycloak pod resource requests and limits
* Additional Java options (JAVA_OPTS)
* Prometheus monitoring using an existing prometheus-operator
* Postgres database to use. By default a Bitnami Postgres is installed
  using the default storage class in the cluster.

Note: Using an external database depends on the unreleased Commodore
feature which supports making postprocessing filters optional, cf.
github.com/projectsyn/commodore#155.
simu added a commit to projectsyn/component-keycloak that referenced this pull request Jul 31, 2020
The current implementation allows configuring the following aspects of
Keycloak:
* The public hostname using either ingress or route
* An initial admin user
* Keycloak pod resource requests and limits
* Additional Java options (JAVA_OPTS)
* Prometheus monitoring using an existing prometheus-operator
* Postgres database to use. By default a Bitnami Postgres is installed
  using the default storage class in the cluster.

Note: Using an external database depends on the unreleased Commodore
feature which supports making postprocessing filters optional, cf.
projectsyn/commodore#155.
simu added a commit to projectsyn/component-keycloak that referenced this pull request Jul 31, 2020
The current implementation allows configuring the following aspects of
Keycloak:
* The public hostname using either ingress or route
* An initial admin user
* Keycloak pod resource requests and limits
* Additional Java options (JAVA_OPTS)
* Prometheus monitoring using an existing prometheus-operator
* Postgres database to use. By default a Bitnami Postgres is installed
  using the default storage class in the cluster.

Note: Using an external database depends on the unreleased Commodore
feature which supports making postprocessing filters optional, cf.
projectsyn/commodore#155.
simu added a commit to projectsyn/component-keycloak that referenced this pull request Jul 31, 2020
The current implementation allows configuring the following aspects of
Keycloak:
* The public hostname using either ingress or route
* An initial admin user
* Keycloak pod resource requests and limits
* Additional Java options (JAVA_OPTS)
* Prometheus monitoring using an existing prometheus-operator
* Postgres database to use. By default a Bitnami Postgres is installed
  using the default storage class in the cluster.

Note: Using an external database depends on the unreleased Commodore
feature which supports making postprocessing filters optional, cf.
projectsyn/commodore#155.
@simu simu force-pushed the postprocess-optional-disable branch 2 times, most recently from 8bbbfb5 to 778bbf1 Compare July 31, 2020 14:54
@simu

simu commented Jul 31, 2020

Copy link
Copy Markdown
Member Author

Rebased on latest master after merging #154

Comment thread CHANGELOG.md Outdated
Comment thread commodore/postprocess/__init__.py Outdated
@simu simu force-pushed the postprocess-optional-disable branch 2 times, most recently from bcf8266 to 1eee3a8 Compare August 2, 2020 12:57
simu added 3 commits August 2, 2020 17:16
This can be useful if we need to apply a postprocessing filter on a
subchart of a Helm chart, e.g. Postgres for Keycloak.

This commit refactors the existing reclass reference parsing for builtin
filters to be more general-purpose, and applies the reference parsing
and resolution to the whole filter dict.
@simu simu merged commit 0822af5 into master Aug 3, 2020
@simu simu deleted the postprocess-optional-disable branch August 3, 2020 06:58
simu added a commit to projectsyn/component-keycloak that referenced this pull request Aug 3, 2020
The current implementation allows configuring the following aspects of
Keycloak:
* The public hostname using either ingress or route
* An initial admin user
* Keycloak pod resource requests and limits
* Additional Java options (JAVA_OPTS)
* Prometheus monitoring using an existing prometheus-operator
* Postgres database to use. By default a Bitnami Postgres is installed
  using the default storage class in the cluster.

Note: Using an external database depends on Commodore support for making
postprocessing filters optional, cf.  projectsyn/commodore#155.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants