My bad. It is working as expected. Thank you all for your quick replies! I think I had an old secret definition hanging around. It seems like "oc delete all -l app=myapp" doesn't delete secrets that have the label?
On 31 January 2017 at 01:54, Ben Parees <bpar...@redhat.com> wrote: > > > On Mon, Jan 30, 2017 at 9:47 AM, Jessica Forrester <jforr...@redhat.com> > wrote: > >> >> >> On Mon, Jan 30, 2017 at 9:11 AM, Aleksandar Lazic <al...@me2digital.eu> >> wrote: >> >>> Hi. >>> >>> ---- On Mon, 30 Jan 2017 10:04:35 +0100 Lionel Orellana < >>> lione...@gmail.com> wrote ---- >>> > Put another way, how can I create a secret from user input? >>> >>> You will need to base64 encode the given string. >>> >> >> Not when using stringData for the input, this gets converted to the >> base64 encoded value on the server before being stored. However, >> stringData was not added until version 1.3 of origin, so if you are using a >> an older origin server then you will have to use the data field instead and >> base 64 encode the input. >> >> >> >>> echo -n 'pass'|base64 >>> This value is then the SVN_PASSWORD >>> >>> what's the ouput of? >>> >>> oc process -f ... -p ... >>> >>> BR aleks--- >>> Mit freundlichen Grüßen >>> Aleksandar Lazic - ME2Digital e. U. >>> https://me2digital.online/ >>> UID-Nr.: ATU71765716 >>> IBAN: AT27 1420 0200 1096 9086 >>> Firmenbuch: 462678 i >>> >>> >>> > On 30 January 2017 at 18:45, Lionel Orellana <lione...@gmail.com> >>> wrote: >>> > Hello >>> > I'm trying to create a secret as part of a template but the value of >>> the secret should come from a parameter. Something like this: >>> > { "kind": "Template", "apiVersion": "v1",... }, >>> > "objects": [ >>> > ... { "kind": "Secret", "apiVersion": >>> "v1", "metadata": { "name": "svn-pwd", >>> "creationTimestamp": null }, "stringData": { >>> "password": "${SVN_PASSWORD}" } } ], >>> "parameters": [ { "name": "SVN_PASSWORD", "value": "", >>> "description": "Will be stored as a secret", "required": true } ]} >>> > >>> > The secret is getting created but it's not resolving the parameter >>> value (i.e. the value is literally ${SVN_PASSWORD}). >>> >> >> You can see some examples of us using Secrets in templates in our >> examples folder, like: >> >> https://github.com/openshift/origin/blob/master/examples/db- >> templates/mariadb-ephemeral-template.json >> >> Offhand I don't see anything wrong with how you have the parameter being >> used in the Secret. Ben? >> > > yeah it looks right to me as well. If you use the parameter elsewhere in > your template (eg as an environment variable), does it get substituted? > does your template contain any other parameters that are, or are not, > getting substituted? > > > > > >> >> >> >>> > Is there a way to resolve the template parameter in the secret >>> definition? >>> > Thanks >>> > >>> > >>> > _______________________________________________ >>> > users mailing list >>> > users@lists.openshift.redhat.com >>> > http://lists.openshift.redhat.com/openshiftmm/listinfo/users >>> > >>> >>> >>> >>> _______________________________________________ >>> users mailing list >>> users@lists.openshift.redhat.com >>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users >>> >> >> > > > -- > Ben Parees | OpenShift > >
_______________________________________________ users mailing list users@lists.openshift.redhat.com http://lists.openshift.redhat.com/openshiftmm/listinfo/users