Closed piyush94 closed 4 years ago
This would be helpful to template the component and fill in the required values at run-time.
CC: @svisagan83
@sbtaylor15 Other way would be to define attributes at application level and access them at component level. Example: Application:
Component:
CC: @svisagan83
@sbtaylor15 Also let us know if there is a way to achieve the above task in the current version of DeployHub. Thanks.
CC: @svisagan83
@piyush94 the change has been included in the latest release. No changes needed to your pre-post actions. The deployment engine will expose these for you.
CC: @svisagan83
@sbtaylor15 it was working with environment and endpoint also earlier, but now it is only working with application. Kindly look into this.
CC: @svisagan83
@piyush94 please send a screen shot of how you are defining the variables at the environment and end point.
CC: @svisagan83
@sbtaylor15 Environment
Endpoint 1
Endpoint 2
Also this warning is coming:
CC: @svisagan83
@sbtaylor15 log where we can see attributes not getting resolved:
CC: @svisagan83
@piyush94 - we move some of the code around that does the variable resolution and tested several different locations of the variables. From our testing all of the variables are now resolving as expected. Please pull the latest image and see how the variables resolve with your data.
CC: @svisagan83
@sbtaylor15 The attribute values seem to be resolving but not getting reset for the second environment:
CC: @svisagan83
@piyush94 -we updated the code to return a new instance of the expanded variable instead of reusing the same instance. The change passed our test cases. Please pull down the latest image and let us know if the variable is expanded correctly with your variable configuration.
CC: @svisagan83
@sbtaylor15 - it seems the resolution itself is not working now.
CC: @svisagan83
@piyush94 please pull the latest image and give it try again. We made one small change that we believe will work with your data configuration.
CC: @svisagan83
@sbtaylor15 - above issue is fixed now. One more thing is, we are providing releasename as a new variable which again will be resolved depending on the environment or endpoint. The resolved value is correct but it is not being passed to the script.
CC: @svisagan83
@piyush94 - can you change the Helm Upgrade, Release Name parameter from ${relname} to ${hw-relname} to see if it gets resolved correctly?
CC: @svisagan83
@sbtaylor15 - it didn't work with the variable name as "hw-relname", so i changed it to "hwRelname" and that worked. But "relname" is not working. hw-relname
hwRelname
relname
CC: @svisagan83
@sbtaylor15 - will it be possible to achieve the attribute resolution, the way i have specified? Regards.
CC: @svisagan83
@piyush94 we are in the process of determining the best way to handle the variable expansion for the parameters. The parameters are handled differently than regular variables.
CC: @svisagan83
@piyush94 - we changed the expansion routine to a recursive lookup. The scenario you described passed our testing. Please pull the latest image.
CC: @svisagan83
@sbtaylor15 - the attributes are now resolving, only issue is that at helm install level it's not working.
- 'ca_relname: ca-hlf-org1'
- 'relname: ca-hlf-org1'
helm upgrade "${ca-relname}" "main/hlf-ca" --version "1.4.1-117" --namespace "hlf-org1" --kubeconfig ~/small-dev-1/config --set config.affiliations.hlf-org1={department1},config.affiliations.hlf-org2={department1} --install --force --debug -f override/main/hlf-ca/values.yaml
CC: @svisagan83
@piyush94 - Change ${ca-relname} to ${ca_relname}. You have a mismatch.
@sbtaylor15 - This is being done by the helm upgrade script.
CC: @svisagan83
@piyush94 - it looks like the ${ca_relname} name should be expand to ca-hlf-org1 prior to the helm upgrade command is being executed. Can we do a web meeting to look at this?
CC: @svisagan83
@sbtaylor15 - can we have a meeting tomorrow (Friday 1/3/20)?
CC: @svisagan83
@piyush94 we were able to track down where the variable was not being expanded. Please pull the latest image for the fix.
CC: @svisagan83
@sbtaylor15 - release name is getting truncated at “-“ character.
CC: @svisagan83
@piyush94 the shortened name is only for display and not effecting the actual command being run. We changed it so more of the helm command line is shown.
Please pull the latest image. Also, we changed the filtering pick list only to show you what visible in the table not everything.
CC: @svisagan83
@piyush94 can we close this issue?
CC: @svisagan83
@sbtaylor15 - closing this issue.
CC: @svisagan83
Is it possible to bind task parameters to object (component, application, etc.) attributes? example scenario:
Parameter:
Component:
Deploy Task:
Log:
CC: @svisagan83