Closed piyush94 closed 4 years ago
@sbtaylor15 And also there should be a option to specify K8 namespace for the helm chart.
CC: @svisagan83
working when attrs are assigned at component level
Add Release Name as variable for helm upgrade parameters.
Made helm init --client only change Added namespace flag on helm install Added namespace on docker component item
Release Name is pass as a variable in the Action. ${component.name} is currently being used. Change it as needed.
@piyush94 here is the update WriteEnv2File and WriteEnv2Toml procedures. Please import these into GLOBAL domain. The import will overwrite the existing procedures.
The dh2helm.py will look for the creds['helmrepo'] variable to pull the credentials for the helm repo login.
Also, the helm deployment will now run on the remote server or localhost (the DH docker container).
Namespace is now part of the Docker Component Item.
Both dh2ansible.py and dh2helm.py were updated to handle using ssh key file if the credential is setup as a Private Key type.
We have regression tested the IIS deployment using the WinShare and IIS playbook. And tested helm deployments locally and remote.
Please pull the latest image.
CC: @svisagan83
Add helmopts to pass in additional cmd line parameters
@sbtaylor15 Little urgent issue, the writeenvtoml is not writing Chart attribute from docker container item and as a result dh2helm is not picking up the Chart attribute,
I tried by adding Chart attribute in application and it worked.
CC: @svisagan83
@sbtaylor15 Also releasename should only be the component name, but it's combining component name, version and chartname for releasename.
CC: @svisagan83
@sbtaylor15 creds["helmrepo"] is not getting picked up.
CC: @svisagan83
@piyush94 can you send a screen shot of the docker component item and of the attributes on the component. I need to see the values listed there, specifically the chart name. I want to make sure the chart name is getting saved to the database for the component item. Also, the chart at the component attribute maybe being overridden by the docker component item.
@sbtaylor15 As per my understanding Chart name automatically maps to docker container item even if add it as an attribute?
I have also imported the new WriteEnv2Toml procedure.
CC: @svisagan83
@sbtaylor15 correct attributes in Jenkinsfile screenshot:
CC: @svisagan83
@sbtaylor15 chartname issue solved by passing "chart" instead of "Chart".
CC: @svisagan83
@sbtaylor15 releasename fix:
CC: @svisagan83
@sbtaylor15 creds issue fix in WriteEnv2Toml: old:
new:
CC: @svisagan83
@sbtaylor15 kindly disable cmd output, it's exposing user password in deployment logs.
CC: @svisagan83
@sbtaylor15 here also:
CC: @svisagan83
@piyush94 - please pull latest image that fixes the password from being displayed
CC: @svisagan83
@sbtaylor15 Hi, any update on helmopts to pass additional arguments. This is required because we have multiple deployment clusters and we need to set --kubeconfig flag with relevant config file while deploying to a particular cluster. Or let us know if there is a better way to handle deployments to different clusters from deployhub. Thanks.
CC: @svisagan83
@piyush94 please pull the latest image. set helmopts attribute to any string and it will be added to the helm upgrade command line after the namespace parameter.
CC: @svisagan83
@sbtaylor15 Hi Steve, i am trying to override the chartnamespace at environment level. but i am getting the below error.
CC: @svisagan83
@piyush94 please pull the latest image. Changed the dh2helm.py to enable overriding of the variables.
Override order is as follows:
For example, variable 'foo' at the component level will override 'foo' defined at the environment level.
FYI, these changes have been made to the beta branch as well.
CC: @svisagan83
@sbtaylor15 our use case was to override the variable at component level with variable at environment level. The thing is we wouldn't want to change namespace for each component instead override it with what is available at environment level. Could you please suggest a better solution/workaround for this use case? Thanks,
CC: @svisagan83
@piyush94 if you just want to reverse precedence we can do that in the WriteEnv2Toml procedure. But if you want to have an override at any point in the precedence hierarchy we will need to come up with another solution. Let me know which way you want to go.
CC: @svisagan83
@sbtaylor15 precedence order is fine for now. One issue happening is we are not able to leave chartnamepspace empty at component level. We have defined chartnamespace at environment level but it's taking value "0" instead taking from environment.
Log:
Component Item:
CC: @svisagan83
@sbtaylor15 chartnamespace was provided at application level but it still got set to "0".
CC: @svisagan83
@piyush94 we fixed the code to handle chartnamespace being blank. Please pull the latest image.
CC: @svisagan83
@piyush94 - Can we close this issue?
CC: @svisagan83
CC: @svisagan83