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

Multi-level hierarchical configuration #767

Closed
edeandrea opened this issue Jun 13, 2022 · 0 comments · Fixed by #780
Closed

Multi-level hierarchical configuration #767

edeandrea opened this issue Jun 13, 2022 · 0 comments · Fixed by #780
Labels
enhancement New feature or request

Comments

@edeandrea
Copy link

edeandrea commented Jun 13, 2022

It would be nice to be able to have multi-level hierarchical configuration.

TL;DR

If I have something like this in application.properties:

%knative.quarkus.config.profile.parent=prod
%knative.quarkus.kubernetes.deployment-target=knative

%knative-17.quarkus.config.profile.parent=knative
%knative-17.quarkus.docker.dockerfile-jvm-path=src/main/docker/Dockerfile.jvm17

%knative-openshift.quarkus.config.profile.parent=knative
%knative-openshift.quarkus.container-image.builder=openshift

%knative-openshift-17.quarkus.config.profile.parent=knative-openshift
%knative-openshift-17.quarkus.openshift.jvm-dockerfile=src/main/docker/Dockerfile.jvm17
%knative-openshift-17.quarkus.openshift.base-jvm-image=registry.access.redhat.com/ubi8/openjdk-17:1.11

This essentially sets up a profile hierarchy

                     prod
                        |
                  knative
                 /          \
      knative-17      knative-openshift
                                    |
                      knative-openshift-17

When I do something like ./mvnw package -Dquarkus.profile=knative-openshift-17 I would have expected the quarkus.kubernetes.deployment-target=knative to be "inherited" by the knative-openshift-17 profile, but it isn't.

Instead, I have to do this, where I end up duplicating a lot of properties:

# KNative
%knative.quarkus.config.profile.parent=prod
%knative.quarkus.kubernetes.deployment-target=knative

%knative-17.quarkus.config.profile.parent=prod
%knative-17.quarkus.kubernetes.deployment-target=knative
%knative-17.quarkus.docker.dockerfile-jvm-path=src/main/docker/Dockerfile.jvm17

# KNative on OpenShift
%knative-openshift.quarkus.config.profile.parent=prod
%knative-openshift.quarkus.container-image.builder=openshift
%knative-openshift.quarkus.kubernetes.deployment-target=knative

%knative-openshift-17.quarkus.config.profile.parent=prod
%knative-openshift-17.quarkus.container-image.builder=openshift
%knative-openshift-17.quarkus.kubernetes.deployment-target=knative
%knative-openshift-17.quarkus.docker.dockerfile-jvm-path=src/main/docker/Dockerfile.jvm17
%knative-openshift-17.quarkus.openshift.jvm-dockerfile=src/main/docker/Dockerfile.jvm17
%knative-openshift-17.quarkus.openshift.base-jvm-image=registry.access.redhat.com/ubi8/openjdk-17:1.11

Full details

For the full story, check this thread out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants