On Wed, Feb 3, 2016 at 9:50 PM, Erik Jacobs <[email protected]> wrote:

> Hi Mateus,
>
> Maybe I'm misunderstanding the problem, but would the secrets mechanism
> not work for this? You could have the ini file be a secret which would be
> attached/mounted into the pod at run-time and could be in that folder as an
> .ini file... I think?
>
> Ben?
>
>
​I believe secrets have to mount over a directory, so that would only work
if the location you wanted to mount the file into was an empty directory in
the image.  But if you can live w/ that constraint, yes what you propose is
possible.
​




>
> Erik M Jacobs, RHCA
> Principal Technical Marketing Manager, OpenShift Enterprise
> Red Hat, Inc.
> Phone: 646.462.3745
> Email: [email protected]
> AOL Instant Messenger: ejacobsatredhat
> Twitter: @ErikonOpen
> Freenode: thoraxe
>
> On Mon, Feb 1, 2016 at 4:43 PM, Mateus Caruccio <
> [email protected]> wrote:
>
>> Hi.
>>
>> I need to run newrelic on a php container. Its license must be set
>> ​from ​
>> php.ini
>> ​ or ​
>> any .ini inside /etc/opt/rh/rh-php56/php.d/
>> ​.
>>
>> ​
>> The problem is it need
>> ​s​
>> to be set on run time, not build time because the license key is stored
>> ​in
>>  a
>> n​
>> env var.
>>
>> What is the best way to do that?
>> Wouldn't be good to have some kind of template processing like [1]?
>> Something like this:
>>
>> for tpl in $PHP_INI_SCAN_DIR/*.template; do
>>    envsubst < $tpl > ${tpl%.template}
>> done
>>
>> There is any reason not to adopt this approach? Is it something origin
>> would accept as a PR?
>>
>> [1]
>> https://github.com/openshift/sti-php/blob/04a0900b68264642def9aaea9465a71e1075e713/5.6/s2i/bin/run#L20-L21
>>
>>
>> *Mateus Caruccio*
>> Master of Puppets
>> +55 (51) 8298.0026
>> gtalk:
>>
>>
>> *[email protected] <[email protected]>twitter:
>> @MateusCaruccio <https://twitter.com/MateusCaruccio>*
>> This message and any attachment are solely for the intended
>> recipient and may contain confidential or privileged information
>> and it can not be forwarded or shared without permission.
>> Thank you!
>>
>> _______________________________________________
>> dev mailing list
>> [email protected]
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
>>
>>
>
> _______________________________________________
> dev mailing list
> [email protected]
> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
>
>


-- 
Ben Parees | OpenShift
_______________________________________________
dev mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev

Reply via email to