Package: helmdt
HELM Deployment ToolkitA deployment toolkit that support:Build and push docker image. (Now supported container repositories:AzureCR)Apply helm packages and values.Link to aks. (Azure kubenetes services)And you could use it with both command-line and guiding ways.Guiding WayManually specify the profile-f | FileActionsdepcheckbuildapplylinkCommand Line Way--yes | Yes-n/--name | Name-e/--env | Environment--no-cache | Stop using cacheProfile file structure<root>Kubernetes Context ProfileDocker Image ProfileHELM Package ProfileHelm Environment ProfileVariablesExampleGuiding WayThis way gives you a guiding flow to deploy your service by select options and input values.helmdt[ACTION]Thehelmdttools will findhelmdt.yaml,helmdt.ymlorhelmdt.jsonand load them as the profile.
If those files are all not found, an error would displayed.Manually specify the profileIf you want to manually specify the profile file, you could use-fargument. Just like:helmdt-fprofile.yaml[ACTION]helmdt-f../profile.yaml[ACTION]helmdt-f/home/profile.yaml[ACTION]These arguments must before the [ACTION] section.-f | FileSet the profile file to use.ActionsdepcheckCheck the dependencies if they were installed.buildBuild the docker image and push it.The tag of the image would be like:build-[SHORT GIT COMMIT HASH], for example:build-e7f38761.applyApply the helm package and values. and some extra values would be passed to helm package:image.tag - The tag that the docker image used. It would first be checked if exists before applying.meta.* - The metadata from the profile would also passed to helm.linkLink the kubenetes context and store it locally (into local kubenetes configuration).Current supported service providers:Azure Kubenetes Services.Command Line WayBy passing the arguments tohelmdt, thehelmdttools would not run in guiding way. If some of the arguments are missing, it would still ask you on-demand.helmdtlink-ndevelopers-internal
helmdtbuild-nstripe-worker-y--no-cache
helmdtapply-nstripe-worker-edev-yThe follow arguments must be after the [ACTION] section.--yes | YesAutomatically skip all the prompts and answeryesfor them. If some of the arguments are missing, and also the-yspecified, an error would be displayed and the tools would be terminated.-n/--name | NameForbuild, the name of the docker profile to build and push.Forapply, the name of the helm package profile to apply.Forlink, the name of the kubenetes context.-e/--env | EnvironmentThe environment to apply. This argument only used in theapplyaction.--no-cache | Stop using cachebypass the--no-cachetodocker build. This argument only used in thebuildaction.Profile file structure<root>kubecontexts: (Kubenetes Context Profile) The contexts could be linked.docker: (Docker Image Profile) The profiles for docker build and push.helm: (Helm Package Profile) The profiles for helm apply.Kubernetes Context Profilename: (string) The short name for the kubernetes context to be link, only used in the script.provider: (string) The name of the service provider. Now we only supported:azure: Azure kubernetes Services.If you'd like to use Azure kubernetes Services, you should also specify the follow keys with the same level withprovider.subscription: (string) The subscription id in the azure portal.resource_group: (string) The resource group that the kubernetes contained.aks_name: (string) The name of the kubernetes service.Docker Image Profilename: (string) The short name for the docker profile, just used in the script.image_name: (string) The image name placed in the local and pushed to the repository.repository: (string) The address of the repository.dockerfile: (string) The Dockerfile used for building.contextpath: (string) The path of building context. If not specified, the parent folder ofdockerfilewould be used by default.HELM Package Profilename: (string) The short name for the helm profile, just used in the script.namespace: (string) The namespace to apply. If not exists, it would created automatically.dpname: (string) The name for the helm deployment, could be found in kubenetes/Deployment.package: (string) The path of the package.environments: (list ofHelm Environment Profile) The environment entries.Helm Environment Profilename: (string) The short name for the environment profile, just used in the script.values_file: (string) The values file.kubecontext: (string) The name of the kubenetes context where the helm package to be applied.Variables$(gitroot)- Would be replated to the root path of the current git repository.Examplekubecontexts:-name:intprovider:azuresubscription:xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxresource_group:resource-groupaks_name:service1-intdocker:-name:service1image_name:service1dockerfile:$(gitroot)/docker/service1/Dockerfilecontext:$(gitroot)/srcrepository:xxx.azurecr.iohelm:-name:service1dpname:service1namespace:ns1package:$(gitroot)/helm-packagesenvironments:-name:devvalues_file:$(gitroot)/helm-values/dev.yamlkubecontext:service1-dev-name:prodvalues_file:$(gitroot)/helm-values/prod.yamlkubecontext:service1-prod