cancel
Showing results for 
Search instead for 
Did you mean: 
MarkosS
Flight Engineer
Flight Engineer
  • 599 Views

small error in chapter 1 lab

Jump to solution

The first step of the last lab is the command:

oc patch installplan install-4k2q8 --type merge --patch '{"spec":{"approved":true}}'

This did not seem to work.

So I used install-dpsnp and it worked fine!

 

 

1 Solution

Accepted Solutions
TomHutter
Mission Specialist
Mission Specialist
  • 586 Views

Hi MarkosS,

if you used the patch command from the solution literally with install-4k2q8, it won't work. You have to get your own install plan with:

oc get installplan

It will differ from install-4k2q8, e.g. for me it was: install-dnsnr

Of course you can combine oc get installplan and oc patch in a way like:

oc patch installplan $(oc get installplans.operators.coreos.com | awk '{ print $1 }') --type merge --patch '{"spec":{"approved":true}}'

$(oc get installplans.operators.coreos.com | sed 1d | awk '{ print $1 }') drops the header line of the output (NAME CSV APPROVAL APPROVED) and awk '{ print $1 }' gives you the first column, which is your installplan.
This command of course will only work with one install plan.

 

View solution in original post

1 Reply
TomHutter
Mission Specialist
Mission Specialist
  • 587 Views

Hi MarkosS,

if you used the patch command from the solution literally with install-4k2q8, it won't work. You have to get your own install plan with:

oc get installplan

It will differ from install-4k2q8, e.g. for me it was: install-dnsnr

Of course you can combine oc get installplan and oc patch in a way like:

oc patch installplan $(oc get installplans.operators.coreos.com | awk '{ print $1 }') --type merge --patch '{"spec":{"approved":true}}'

$(oc get installplans.operators.coreos.com | sed 1d | awk '{ print $1 }') drops the header line of the output (NAME CSV APPROVAL APPROVED) and awk '{ print $1 }' gives you the first column, which is your installplan.
This command of course will only work with one install plan.

 

Join the discussion
You must log in to join this conversation.