Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Environment specific OpenShift resources with some profile selection #729

Closed
LarsMilland opened this issue Dec 12, 2016 · 5 comments
Closed
Assignees
Labels
cat/feature Feature request group/fragments Fragment related prio/p1 Normal priority

Comments

@LarsMilland
Copy link

Description

I am trying to get a project set up where I can use the f-m-p to generate deployment controllers that are structurally different from environment to environment. I would like to have one layout in test without secrets in volumes, and then one prod with secrets mounted in volumes.

I am using resource fragments under src/main/fabric8 and am trying to use the fabric8 profiles and also some Maven profiles, but what ever I try of combinations I end up with getting resources generated from all my resource fragments regardless of how I structure them.

I am trying to place the different resource fragments under environment specific subdirectories:

src/main/fabric8/prod
src/main/fabric8/test

and was hoping I could then select one of these "profiles" with either a Maven profile pointing to only one fabric8 profile or some other trick.

Is this not something that is supported? And if not, then is there some other means where I can have structurally different resource fragments used for different environments.

Best regards
Lars Milland

Info

  • f-m-p version : 3.2.8

  • Maven version (mvn -v) :
    Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
    Maven home: c:\maven
    Java version: 1.8.0_60, vendor: Oracle Corporation
    Java home: C:\Java\jdk1.8.0_60\jre
    Default locale: en_US, platform encoding: Cp1252
    OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"

@rhuss
Copy link
Contributor

rhuss commented Dec 12, 2016

f-m-p's profile feature is currently only for selecting Generators, Enrichers and their configuration. It's not for selecting a set of resource fragments. Currently for you to have this would be to use a different <resourceDir> (property : fabric8.resourceDir) which currently points to src/main/fabric8. This way you can have different Maven profiles pointing to different directories (e.g. src/main/fabric8-prod and src/main/fabric8-test). The drawback is, that you can't easily share resource fragments this way (you would need to copy them for now). If this is a valid use case for you, one could think about extending resourceDir to resourceDirs in order to specify multiple directories which are then merged together.

Would this solution with different resourceDirs help in your scenario ?

@jstrachan
Copy link
Contributor

you could use a maven profile to add test dependencies for tests (e.g. adding test secrets or whatever)

@calohmn
Copy link

calohmn commented Jun 7, 2017

We have the same issue as reported here.

Regarding the above comment from @rhuss:
yes, a resourceDirs property to specify multiple directories would help here, providing a means to have a separate directory for shared fragments.

@stale
Copy link

stale bot commented Oct 4, 2018

This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!

@stale stale bot added the status/stale Issue/PR considered to be stale label Oct 4, 2018
@stale stale bot closed this as completed Oct 11, 2018
@rhuss rhuss reopened this Oct 12, 2018
@stale stale bot removed the status/stale Issue/PR considered to be stale label Oct 12, 2018
@rhuss
Copy link
Contributor

rhuss commented Oct 12, 2018

I think having a way to specify multiple resource directories make still sense. This should be evaluated again when we are restructuring the fabric8 src directory to hold more flexible configuration.

@rhuss rhuss added cat/feature Feature request prio/p1 Normal priority group/fragments Fragment related labels Oct 12, 2018
@lordofthejars lordofthejars self-assigned this Dec 18, 2018
lordofthejars added a commit that referenced this issue Dec 19, 2018
lordofthejars added a commit to lordofthejars/fabric8-maven-plugin that referenced this issue Dec 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cat/feature Feature request group/fragments Fragment related prio/p1 Normal priority
Projects
None yet
Development

No branches or pull requests

5 participants