question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for "runtime fragments"

See original GitHub issue

Since all generated resource objects end up in the artifact jars within META-INF/fabric8 they have to be independent of any concrete cluster installation (i.e. the must not contain the value of certain namespaces or private registries)

However, for fabric8:apply it make sense also to apply runtime specific objects which e.g. references also the namespace / project.

For example, consider role bindings, which contains the namespace in their values.

Build configs and Image Stream are other examples which are platform specific. These are not used during fabric8:apply but for fabric8:build and generated automatically. It would be nice if those could be enriched as well.

So I suggest introducing an extra runtime fragments directory, parallel to src/main/fabric8. E.g. a src/main/fabric8-rt. This could contain e.g. the role bindings required and they would be enriched when fabric8:apply or fabric8:build is called.

@jstrachan wdyt? I believe this is a good solution to keep separate and we can even add more fanciness when we are doing the deployment. E.g. we can introduce pre-defined variables (like ${namespace} or ${registry} which we then can put into the spots needed.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
rhusscommented, Oct 5, 2018

@fabric8io/fmp-core-team should we pick up the discussion again ? After we have gained now some experiences over the years, I think the it’s still valid, that there are two kinds of deployment configuration: One which is independent on the target platform where the application is deployed (like deployments, services, etc.) and some which are very specific of the final cluster where the application is deployed to (best example is the “namespace”). So, should the “namespace” part of the generated resource descriptors which are stored also in the jars and distributed via Maven or should it be specified somewhere else (these kind of runtime fragments, or in the configuration for ‘fabric8:apply’). I think it should be separated.

For other things like configmaps or secrets which differ from environment to environment its similar but not so clear. I really think that configmaps should be added only as templates to the generated resources, which are filled when applied.

It’s a larger, principal discussion in which direction f-m-p should go, so I don’t expect a quick solution.

0reactions
stale[bot]commented, Apr 3, 2019

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating and Using Fragments | CodePath Android Cliffnotes
There are two ways to add a fragment to an activity: dynamically using Java and statically using XML. Before embedding a "support" fragment...
Read more >
Fragment manager - Android Developers
At runtime, the FragmentManager can perform back stack operations like adding or removing fragments in response to user interactions.
Read more >
How to add fragment during runtime in android - Stack Overflow
Try using a pattern like this in your onCreate. It is much cleaner, plus it uses the proper getSupportFragmentManager() instead of the ...
Read more >
Android Studio | How To Add Fragment At Runtime In Activity
In this Android Studio video i want to show How To Add Fragment At Runtime In Activity.A Fragment is a piece of an...
Read more >
Building dynamic user interfaces in Android with fragments
To use your new fragment, you can statically add it to an XML layout. In this case the android:name attribute points to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found