Re: Updating the clusterquota object

2016-11-08 Thread Ben Pritchett
I suppose we'll need to use "oc update -f $template" and track our
clusterquota templates (oc edit and oc patch aren't the nicest things to
idempotently automate).  The nice thing about having --dry-run associated
is at least we wouldn't have to maintain YAML templates, and we could rely
on the API to generate object files for us.  I can file an RFE and see what
makes sense there.

Thanks,

Ben Pritchett

On Tue, Nov 8, 2016 at 11:12 AM, David Eads  wrote:

> All the basic CRUD commands work, so you can run `oc
> edit clusterquota/name`, `oc patch clusterquota/name `, or `oc
> update -f `.
>
> On Tue, Nov 8, 2016 at 11:06 AM, Ben Pritchett 
> wrote:
>
>> Is there a method for updating clusterquotas that have already been
>> created?  Referencing the creation process here:
>> https://docs.openshift.com/container-platform/3.3/admin_guid
>> e/multiproject_quota.html#multi-project-quotas-selecting-projects
>>
>> There isn't a "oc update clusterquota foo" and the workaround for
>> configmaps doesn't seem to work due to missing --dry-run option.  The
>> workaround for configmaps is below:
>>
>> oc create configmap foo --from-file=haproxy-config.template --dry-run -o
>> yaml | oc update -f -
>>
>> Trying to automate this for a large cluster buildout, where we'll need
>> per-user clusterquota definitions for self-provisioning.
>>
>> Thanks,
>>
>> Ben Pritchett
>>
>> ___
>> 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


Re: Updating the clusterquota object

2016-11-08 Thread David Eads
All the basic CRUD commands work, so you can run `oc
edit clusterquota/name`, `oc patch clusterquota/name `, or `oc
update -f `.

On Tue, Nov 8, 2016 at 11:06 AM, Ben Pritchett  wrote:

> Is there a method for updating clusterquotas that have already been
> created?  Referencing the creation process here:
> https://docs.openshift.com/container-platform/3.3/admin_
> guide/multiproject_quota.html#multi-project-quotas-selecting-projects
>
> There isn't a "oc update clusterquota foo" and the workaround for
> configmaps doesn't seem to work due to missing --dry-run option.  The
> workaround for configmaps is below:
>
> oc create configmap foo --from-file=haproxy-config.template --dry-run -o
> yaml | oc update -f -
>
> Trying to automate this for a large cluster buildout, where we'll need
> per-user clusterquota definitions for self-provisioning.
>
> Thanks,
>
> Ben Pritchett
>
> ___
> 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


Updating the clusterquota object

2016-11-08 Thread Ben Pritchett
Is there a method for updating clusterquotas that have already been
created?  Referencing the creation process here:
https://docs.openshift.com/container-platform/3.3/admin_guide/multiproject_quota.html#multi-project-quotas-selecting-projects

There isn't a "oc update clusterquota foo" and the workaround for
configmaps doesn't seem to work due to missing --dry-run option.  The
workaround for configmaps is below:

oc create configmap foo --from-file=haproxy-config.template --dry-run -o
yaml | oc update -f -

Trying to automate this for a large cluster buildout, where we'll need
per-user clusterquota definitions for self-provisioning.

Thanks,

Ben Pritchett
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Error: valueFrom fieldRef resource => ...env[5].valueFrom.fieldRef.fieldPath: Required value

2016-11-08 Thread Stéphane Klein
2016-11-08 16:43 GMT+01:00 Marko Lukša :

> Your version of oc is too old. Your file works for me, when I use 1.3.0+,
> but I get the same error as you when using 1.2.0.
>

Thanks !

I've created this issue: https://github.com/openshift/origin/issues/11836 «
Suggestion: append in `oc` a warning message if you use oc version <
OpenShift server version »
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Error: valueFrom fieldRef resource => ...env[5].valueFrom.fieldRef.fieldPath: Required value

2016-11-08 Thread Marko Lukša
Your version of oc is too old. Your file works for me, when I use 
1.3.0+, but I get the same error as you when using 1.2.0.


On 08. 11. 2016 16:22, Stéphane Klein wrote:
> This error occurs when you specify multiple field references 
simultaneously like fieldRef and resourceFieldRef together.


I've only resourceFieldRef here:

  - name: MEMORY_LIMIT
valueFrom:
  resourceFieldRef:
resource: limits.memory
  - name: CPU_LIMIT
valueFrom:
  resourceFieldRef:
resource: limits.cpu
divisor: 1m

complete file: 
https://gist.github.com/harobed/fc24a7766dbcf2d9e61f42dd8a968a6c



2016-11-08 16:14 GMT+01:00 Stéphane Klein >:


https://gist.github.com/harobed/fc24a7766dbcf2d9e61f42dd8a968a6c


2016-11-08 16:03 GMT+01:00 Avesh Agarwal >:



On Tue, Nov 8, 2016 at 8:50 AM, Stéphane Klein
> wrote:



2016-11-08 13:43 GMT+01:00 Avesh Agarwal
>:



On Tue, Nov 8, 2016 at 5:44 AM, Stéphane Klein
> wrote:

Hi,

I've this ReplicationController:

apiVersion: v1
kind: List
metadata: {}
items:
- apiVersion: v1
  kind: ReplicationController
  metadata:
labels:
metrics-infra: hawkular-cassandra
  name: hawkular-cassandra
  type: hawkular-cassandra
name: hawkular-cassandra-1
  spec:
replicas: 1
selector:
  name: hawkular-cassandra-1
template:
metadata:
labels:
metrics-infra: hawkular-cassandra
name: hawkular-cassandra-1
type: hawkular-cassandra
  spec:
nodeSelector:
name: atomic-test-node-1
containers:
- command:
  -
/opt/apache-cassandra/bin/cassandra-docker.sh
  - --cluster_name=hawkular-metrics

  ...

  env:
  - name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
  - name: MEMORY_LIMIT
valueFrom:
fieldRef:


Should be resourceFieldRef .

resource: limits.memory
  - name: CPU_LIMIT
valueFrom:
fieldRef:


Should be resourceFieldRef


With resourceFieldRef like here

https://github.com/openshift/origin-metrics/blob/master/deployer/templates/hawkular-cassandra-node-emptydir.yaml#L83



I have this error:

Error from server: ReplicationController
"hawkular-cassandra-1" is invalid:
[spec.template.spec.containers[0].env[5].valueFrom:
Invalid value: "": may not have more than one field
specified at a time,
spec.template.spec.containers[0].env[6].valueFrom: Invalid
value: "": may not have more than one field specified at a
time]


This error occurs when you specify multiple field references
simultaneously like fieldRef and resourceFieldRef together.
Could you share a link to your spec, and what openshift/origin
version you are using? I tried
https://paste.fedoraproject.org/475673/47861727/
 and it
worked for me.


Thanks
Avesh




-- 
Stéphane Klein >
blog: http://stephane-klein.info
cv : http://cv.stephane-klein.info
Twitter: http://twitter.com/klein_stephane





--
Stéphane Klein >

blog: http://stephane-klein.info
cv : http://cv.stephane-klein.info
Twitter: 

Re: Error: valueFrom fieldRef resource => ...env[5].valueFrom.fieldRef.fieldPath: Required value

2016-11-08 Thread Avesh Agarwal
On Tue, Nov 8, 2016 at 10:22 AM, Stéphane Klein  wrote:

> > This error occurs when you specify multiple field references
> simultaneously like fieldRef and resourceFieldRef together.
>
> I've only resourceFieldRef here:
>
>   - name: MEMORY_LIMIT
> valueFrom:
>   resourceFieldRef:
> resource: limits.memory
>   - name: CPU_LIMIT
> valueFrom:
>   resourceFieldRef:
> resource: limits.cpu
> divisor: 1m
>
> complete file: https://gist.github.com/harobe
> d/fc24a7766dbcf2d9e61f42dd8a968a6c
>
>
Actually this works for me (though I had to do some tweaking to run it, but
nothing related to env vars
https://gist.github.com/aveshagarwal/031e9d2d066ddd043fd954c2323a0b8c),
Could you share openshift or origin version you are using?

Thanks
Avesh

>
> 2016-11-08 16:14 GMT+01:00 Stéphane Klein :
>
>> https://gist.github.com/harobed/fc24a7766dbcf2d9e61f42dd8a968a6c
>>
>> 2016-11-08 16:03 GMT+01:00 Avesh Agarwal :
>>
>>>
>>>
>>> On Tue, Nov 8, 2016 at 8:50 AM, Stéphane Klein <
>>> cont...@stephane-klein.info> wrote:
>>>


 2016-11-08 13:43 GMT+01:00 Avesh Agarwal :

>
>
> On Tue, Nov 8, 2016 at 5:44 AM, Stéphane Klein <
> cont...@stephane-klein.info> wrote:
>
>> Hi,
>>
>> I've this ReplicationController:
>>
>> apiVersion: v1
>> kind: List
>> metadata: {}
>> items:
>> - apiVersion: v1
>>   kind: ReplicationController
>>   metadata:
>> labels:
>>   metrics-infra: hawkular-cassandra
>>   name: hawkular-cassandra
>>   type: hawkular-cassandra
>> name: hawkular-cassandra-1
>>   spec:
>> replicas: 1
>> selector:
>>   name: hawkular-cassandra-1
>> template:
>>   metadata:
>> labels:
>>   metrics-infra: hawkular-cassandra
>>   name: hawkular-cassandra-1
>>   type: hawkular-cassandra
>>   spec:
>> nodeSelector:
>>   name: atomic-test-node-1
>> containers:
>> - command:
>>   - /opt/apache-cassandra/bin/cassandra-docker.sh
>>   - --cluster_name=hawkular-metrics
>>
>>   ...
>>
>>   env:
>>   - name: POD_NAMESPACE
>> valueFrom:
>>   fieldRef:
>> fieldPath: metadata.namespace
>>   - name: MEMORY_LIMIT
>> valueFrom:
>>   fieldRef:
>>
>
> Should be resourceFieldRef .
>
> resource: limits.memory
>>   - name: CPU_LIMIT
>> valueFrom:
>>   fieldRef:
>>
>
> Should be resourceFieldRef
>

 With resourceFieldRef like here https://github.com/openshift/o
 rigin-metrics/blob/master/deployer/templates/hawkular-cassan
 dra-node-emptydir.yaml#L83

 I have this error:

 Error from server: ReplicationController "hawkular-cassandra-1" is
 invalid: [spec.template.spec.containers[0].env[5].valueFrom: Invalid
 value: "": may not have more than one field specified at a time,
 spec.template.spec.containers[0].env[6].valueFrom: Invalid value: "":
 may not have more than one field specified at a time]

>>>
>>> This error occurs when you specify multiple field references
>>> simultaneously like fieldRef and resourceFieldRef together. Could you share
>>> a link to your spec, and what openshift/origin version you are using? I
>>> tried  https://paste.fedoraproject.org/475673/47861727/ and it worked
>>> for me.
>>>
>>>
>>> Thanks
>>> Avesh
>>>
>>>
>>
>>
>>
>> --
>> Stéphane Klein 
>> blog: http://stephane-klein.info
>> cv : http://cv.stephane-klein.info
>> Twitter: http://twitter.com/klein_stephane
>>
>
>
>
> --
> Stéphane Klein 
> blog: http://stephane-klein.info
> cv : http://cv.stephane-klein.info
> Twitter: http://twitter.com/klein_stephane
>
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Error: valueFrom fieldRef resource => ...env[5].valueFrom.fieldRef.fieldPath: Required value

2016-11-08 Thread Stéphane Klein
> This error occurs when you specify multiple field references
simultaneously like fieldRef and resourceFieldRef together.

I've only resourceFieldRef here:

  - name: MEMORY_LIMIT
valueFrom:
  resourceFieldRef:
resource: limits.memory
  - name: CPU_LIMIT
valueFrom:
  resourceFieldRef:
resource: limits.cpu
divisor: 1m

complete file:
https://gist.github.com/harobed/fc24a7766dbcf2d9e61f42dd8a968a6c


2016-11-08 16:14 GMT+01:00 Stéphane Klein :

> https://gist.github.com/harobed/fc24a7766dbcf2d9e61f42dd8a968a6c
>
> 2016-11-08 16:03 GMT+01:00 Avesh Agarwal :
>
>>
>>
>> On Tue, Nov 8, 2016 at 8:50 AM, Stéphane Klein <
>> cont...@stephane-klein.info> wrote:
>>
>>>
>>>
>>> 2016-11-08 13:43 GMT+01:00 Avesh Agarwal :
>>>


 On Tue, Nov 8, 2016 at 5:44 AM, Stéphane Klein <
 cont...@stephane-klein.info> wrote:

> Hi,
>
> I've this ReplicationController:
>
> apiVersion: v1
> kind: List
> metadata: {}
> items:
> - apiVersion: v1
>   kind: ReplicationController
>   metadata:
> labels:
>   metrics-infra: hawkular-cassandra
>   name: hawkular-cassandra
>   type: hawkular-cassandra
> name: hawkular-cassandra-1
>   spec:
> replicas: 1
> selector:
>   name: hawkular-cassandra-1
> template:
>   metadata:
> labels:
>   metrics-infra: hawkular-cassandra
>   name: hawkular-cassandra-1
>   type: hawkular-cassandra
>   spec:
> nodeSelector:
>   name: atomic-test-node-1
> containers:
> - command:
>   - /opt/apache-cassandra/bin/cassandra-docker.sh
>   - --cluster_name=hawkular-metrics
>
>   ...
>
>   env:
>   - name: POD_NAMESPACE
> valueFrom:
>   fieldRef:
> fieldPath: metadata.namespace
>   - name: MEMORY_LIMIT
> valueFrom:
>   fieldRef:
>

 Should be resourceFieldRef .

 resource: limits.memory
>   - name: CPU_LIMIT
> valueFrom:
>   fieldRef:
>

 Should be resourceFieldRef

>>>
>>> With resourceFieldRef like here https://github.com/openshift/o
>>> rigin-metrics/blob/master/deployer/templates/hawkular-cassan
>>> dra-node-emptydir.yaml#L83
>>>
>>> I have this error:
>>>
>>> Error from server: ReplicationController "hawkular-cassandra-1" is
>>> invalid: [spec.template.spec.containers[0].env[5].valueFrom: Invalid
>>> value: "": may not have more than one field specified at a time,
>>> spec.template.spec.containers[0].env[6].valueFrom: Invalid value: "":
>>> may not have more than one field specified at a time]
>>>
>>
>> This error occurs when you specify multiple field references
>> simultaneously like fieldRef and resourceFieldRef together. Could you share
>> a link to your spec, and what openshift/origin version you are using? I
>> tried  https://paste.fedoraproject.org/475673/47861727/ and it worked
>> for me.
>>
>>
>> Thanks
>> Avesh
>>
>>
>
>
>
> --
> Stéphane Klein 
> blog: http://stephane-klein.info
> cv : http://cv.stephane-klein.info
> Twitter: http://twitter.com/klein_stephane
>



-- 
Stéphane Klein 
blog: http://stephane-klein.info
cv : http://cv.stephane-klein.info
Twitter: http://twitter.com/klein_stephane
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Error: valueFrom fieldRef resource => ...env[5].valueFrom.fieldRef.fieldPath: Required value

2016-11-08 Thread Stéphane Klein
https://gist.github.com/harobed/fc24a7766dbcf2d9e61f42dd8a968a6c

2016-11-08 16:03 GMT+01:00 Avesh Agarwal :

>
>
> On Tue, Nov 8, 2016 at 8:50 AM, Stéphane Klein <
> cont...@stephane-klein.info> wrote:
>
>>
>>
>> 2016-11-08 13:43 GMT+01:00 Avesh Agarwal :
>>
>>>
>>>
>>> On Tue, Nov 8, 2016 at 5:44 AM, Stéphane Klein <
>>> cont...@stephane-klein.info> wrote:
>>>
 Hi,

 I've this ReplicationController:

 apiVersion: v1
 kind: List
 metadata: {}
 items:
 - apiVersion: v1
   kind: ReplicationController
   metadata:
 labels:
   metrics-infra: hawkular-cassandra
   name: hawkular-cassandra
   type: hawkular-cassandra
 name: hawkular-cassandra-1
   spec:
 replicas: 1
 selector:
   name: hawkular-cassandra-1
 template:
   metadata:
 labels:
   metrics-infra: hawkular-cassandra
   name: hawkular-cassandra-1
   type: hawkular-cassandra
   spec:
 nodeSelector:
   name: atomic-test-node-1
 containers:
 - command:
   - /opt/apache-cassandra/bin/cassandra-docker.sh
   - --cluster_name=hawkular-metrics

   ...

   env:
   - name: POD_NAMESPACE
 valueFrom:
   fieldRef:
 fieldPath: metadata.namespace
   - name: MEMORY_LIMIT
 valueFrom:
   fieldRef:

>>>
>>> Should be resourceFieldRef .
>>>
>>> resource: limits.memory
   - name: CPU_LIMIT
 valueFrom:
   fieldRef:

>>>
>>> Should be resourceFieldRef
>>>
>>
>> With resourceFieldRef like here https://github.com/openshift/o
>> rigin-metrics/blob/master/deployer/templates/hawkular-cassan
>> dra-node-emptydir.yaml#L83
>>
>> I have this error:
>>
>> Error from server: ReplicationController "hawkular-cassandra-1" is
>> invalid: [spec.template.spec.containers[0].env[5].valueFrom: Invalid
>> value: "": may not have more than one field specified at a time,
>> spec.template.spec.containers[0].env[6].valueFrom: Invalid value: "":
>> may not have more than one field specified at a time]
>>
>
> This error occurs when you specify multiple field references
> simultaneously like fieldRef and resourceFieldRef together. Could you share
> a link to your spec, and what openshift/origin version you are using? I
> tried  https://paste.fedoraproject.org/475673/47861727/ and it worked for
> me.
>
>
> Thanks
> Avesh
>
>



-- 
Stéphane Klein 
blog: http://stephane-klein.info
cv : http://cv.stephane-klein.info
Twitter: http://twitter.com/klein_stephane
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Error: valueFrom fieldRef resource => ...env[5].valueFrom.fieldRef.fieldPath: Required value

2016-11-08 Thread Avesh Agarwal
On Tue, Nov 8, 2016 at 8:50 AM, Stéphane Klein 
wrote:

>
>
> 2016-11-08 13:43 GMT+01:00 Avesh Agarwal :
>
>>
>>
>> On Tue, Nov 8, 2016 at 5:44 AM, Stéphane Klein <
>> cont...@stephane-klein.info> wrote:
>>
>>> Hi,
>>>
>>> I've this ReplicationController:
>>>
>>> apiVersion: v1
>>> kind: List
>>> metadata: {}
>>> items:
>>> - apiVersion: v1
>>>   kind: ReplicationController
>>>   metadata:
>>> labels:
>>>   metrics-infra: hawkular-cassandra
>>>   name: hawkular-cassandra
>>>   type: hawkular-cassandra
>>> name: hawkular-cassandra-1
>>>   spec:
>>> replicas: 1
>>> selector:
>>>   name: hawkular-cassandra-1
>>> template:
>>>   metadata:
>>> labels:
>>>   metrics-infra: hawkular-cassandra
>>>   name: hawkular-cassandra-1
>>>   type: hawkular-cassandra
>>>   spec:
>>> nodeSelector:
>>>   name: atomic-test-node-1
>>> containers:
>>> - command:
>>>   - /opt/apache-cassandra/bin/cassandra-docker.sh
>>>   - --cluster_name=hawkular-metrics
>>>
>>>   ...
>>>
>>>   env:
>>>   - name: POD_NAMESPACE
>>> valueFrom:
>>>   fieldRef:
>>> fieldPath: metadata.namespace
>>>   - name: MEMORY_LIMIT
>>> valueFrom:
>>>   fieldRef:
>>>
>>
>> Should be resourceFieldRef .
>>
>> resource: limits.memory
>>>   - name: CPU_LIMIT
>>> valueFrom:
>>>   fieldRef:
>>>
>>
>> Should be resourceFieldRef
>>
>
> With resourceFieldRef like here https://github.com/openshift/o
> rigin-metrics/blob/master/deployer/templates/hawkular-cassan
> dra-node-emptydir.yaml#L83
>
> I have this error:
>
> Error from server: ReplicationController "hawkular-cassandra-1" is
> invalid: [spec.template.spec.containers[0].env[5].valueFrom: Invalid value:
> "": may not have more than one field specified at a time,
> spec.template.spec.containers[0].env[6].valueFrom: Invalid value: "": may
> not have more than one field specified at a time]
>

This error occurs when you specify multiple field references simultaneously
like fieldRef and resourceFieldRef together. Could you share a link to your
spec, and what openshift/origin version you are using? I tried
https://paste.fedoraproject.org/475673/47861727/ and it worked for me.


Thanks
Avesh
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Error: valueFrom fieldRef resource => ...env[5].valueFrom.fieldRef.fieldPath: Required value

2016-11-08 Thread Stéphane Klein
2016-11-08 13:43 GMT+01:00 Avesh Agarwal :

>
>
> On Tue, Nov 8, 2016 at 5:44 AM, Stéphane Klein <
> cont...@stephane-klein.info> wrote:
>
>> Hi,
>>
>> I've this ReplicationController:
>>
>> apiVersion: v1
>> kind: List
>> metadata: {}
>> items:
>> - apiVersion: v1
>>   kind: ReplicationController
>>   metadata:
>> labels:
>>   metrics-infra: hawkular-cassandra
>>   name: hawkular-cassandra
>>   type: hawkular-cassandra
>> name: hawkular-cassandra-1
>>   spec:
>> replicas: 1
>> selector:
>>   name: hawkular-cassandra-1
>> template:
>>   metadata:
>> labels:
>>   metrics-infra: hawkular-cassandra
>>   name: hawkular-cassandra-1
>>   type: hawkular-cassandra
>>   spec:
>> nodeSelector:
>>   name: atomic-test-node-1
>> containers:
>> - command:
>>   - /opt/apache-cassandra/bin/cassandra-docker.sh
>>   - --cluster_name=hawkular-metrics
>>
>>   ...
>>
>>   env:
>>   - name: POD_NAMESPACE
>> valueFrom:
>>   fieldRef:
>> fieldPath: metadata.namespace
>>   - name: MEMORY_LIMIT
>> valueFrom:
>>   fieldRef:
>>
>
> Should be resourceFieldRef .
>
> resource: limits.memory
>>   - name: CPU_LIMIT
>> valueFrom:
>>   fieldRef:
>>
>
> Should be resourceFieldRef
>

With resourceFieldRef like here https://github.com/openshift/
origin-metrics/blob/master/deployer/templates/hawkular-
cassandra-node-emptydir.yaml#L83

I have this error:

Error from server: ReplicationController "hawkular-cassandra-1" is invalid:
[spec.template.spec.containers[0].env[5].valueFrom: Invalid value: "": may
not have more than one field specified at a time,
spec.template.spec.containers[0].env[6].valueFrom: Invalid value: "": may
not have more than one field specified at a time]
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Upgrading to 1.3 / 3.3

2016-11-08 Thread Philippe Lafoucrière
On Mon, Nov 7, 2016 at 5:31 PM, Diego Castro 
wrote:

> Hi Philippe i have upgraded without major issues using blue/green upgrade.
> The only thing was the secured registry that i managed to solve turning off
> the hosted registry at inventory file.
>

Thanks for sharing this. Do you use metrics in your cluster? Did it went
well?
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


Re: Error: valueFrom fieldRef resource => ...env[5].valueFrom.fieldRef.fieldPath: Required value

2016-11-08 Thread Avesh Agarwal
On Tue, Nov 8, 2016 at 5:44 AM, Stéphane Klein 
wrote:

> Hi,
>
> I've this ReplicationController:
>
> apiVersion: v1
> kind: List
> metadata: {}
> items:
> - apiVersion: v1
>   kind: ReplicationController
>   metadata:
> labels:
>   metrics-infra: hawkular-cassandra
>   name: hawkular-cassandra
>   type: hawkular-cassandra
> name: hawkular-cassandra-1
>   spec:
> replicas: 1
> selector:
>   name: hawkular-cassandra-1
> template:
>   metadata:
> labels:
>   metrics-infra: hawkular-cassandra
>   name: hawkular-cassandra-1
>   type: hawkular-cassandra
>   spec:
> nodeSelector:
>   name: atomic-test-node-1
> containers:
> - command:
>   - /opt/apache-cassandra/bin/cassandra-docker.sh
>   - --cluster_name=hawkular-metrics
>
>   ...
>
>   env:
>   - name: POD_NAMESPACE
> valueFrom:
>   fieldRef:
> fieldPath: metadata.namespace
>   - name: MEMORY_LIMIT
> valueFrom:
>   fieldRef:
>

Should be resourceFieldRef .

resource: limits.memory
>   - name: CPU_LIMIT
> valueFrom:
>   fieldRef:
>

Should be resourceFieldRef


> resource: limits.cpu
> divisor: 1m
>   resources:
> limits:
>   cpu: '1'
>   memory: 500Mi
>   ...
>
> I've this error:
>
> * spec.template.spec.containers[0].env[5].valueFrom.fieldRef.fieldPath:
> Required value
> * spec.template.spec.containers[0].env[6].valueFrom.fieldRef.fieldPath:
> Required value
>
> Where is my mistake ?
>
> I found no example with valueFrom + resource in OpenShift documentation.
>
> Best regards,
> Stéphane
> --
> Stéphane Klein 
> blog: http://stephane-klein.info
> cv : http://cv.stephane-klein.info
> Twitter: http://twitter.com/klein_stephane
>
> ___
> 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


Error: valueFrom fieldRef resource => ...env[5].valueFrom.fieldRef.fieldPath: Required value

2016-11-08 Thread Stéphane Klein
Hi,

I've this ReplicationController:

apiVersion: v1
kind: List
metadata: {}
items:
- apiVersion: v1
  kind: ReplicationController
  metadata:
labels:
  metrics-infra: hawkular-cassandra
  name: hawkular-cassandra
  type: hawkular-cassandra
name: hawkular-cassandra-1
  spec:
replicas: 1
selector:
  name: hawkular-cassandra-1
template:
  metadata:
labels:
  metrics-infra: hawkular-cassandra
  name: hawkular-cassandra-1
  type: hawkular-cassandra
  spec:
nodeSelector:
  name: atomic-test-node-1
containers:
- command:
  - /opt/apache-cassandra/bin/cassandra-docker.sh
  - --cluster_name=hawkular-metrics

  ...

  env:
  - name: POD_NAMESPACE
valueFrom:
  fieldRef:
fieldPath: metadata.namespace
  - name: MEMORY_LIMIT
valueFrom:
  fieldRef:
resource: limits.memory
  - name: CPU_LIMIT
valueFrom:
  fieldRef:
resource: limits.cpu
divisor: 1m
  resources:
limits:
  cpu: '1'
  memory: 500Mi
  ...

I've this error:

* spec.template.spec.containers[0].env[5].valueFrom.fieldRef.fieldPath:
Required value
* spec.template.spec.containers[0].env[6].valueFrom.fieldRef.fieldPath:
Required value

Where is my mistake ?

I found no example with valueFrom + resource in OpenShift documentation.

Best regards,
Stéphane
-- 
Stéphane Klein 
blog: http://stephane-klein.info
cv : http://cv.stephane-klein.info
Twitter: http://twitter.com/klein_stephane
___
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users