Skip to content
This repository has been archived by the owner on Feb 27, 2020. It is now read-only.

Add support for deployment with helm #85

Merged
merged 3 commits into from
Feb 12, 2018
Merged

Conversation

yujunz
Copy link
Contributor

@yujunz yujunz commented Jan 17, 2018

No description provided.

@johadalin johadalin self-assigned this Feb 9, 2018
Copy link
Contributor

@johadalin johadalin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Yujunz,
Firstly, thanks a lot for sending this over! It's really great that you're getting involved in enhancing the project to use Helm. Should be able to work this out and get it in soon, and then we can see what else we can add.

I've put a few specific points in line, but i think this would be a lot nicer if we can merge the function you're adding in with the existing k8s-gencfg script, and moving things around to be a bit clearer. I think the right approach would be doing the following:

  • creating a new helm/ directory under the kubernetes/ directory
  • Moving the Chart.yaml and values.yaml to under helm/
  • Parameterising the values.yaml file, similar to what is in our current templates
  • Enhancing the k8s-gencfg script with a new function/logic that:
    • creates the clearwater/ helm package directory
    • Moves the files in helm/ across, filling in the parameterised image path and tag values (as we do for the existing templates)
    • Copies the main clearwater yaml files across to clearwater/
  • add the whole clearwater/ directory to the gitignore

This would mean users should only need to run the single config generation command, and we only have one source of truth for the image path and tag, not having values hardcoded in the values.yaml.

What do you think about this approach?

# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
image:
path: quay.io/clearwater_ims
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is currently pointing to your own build of Clearwater. Would be much better as a parameter that the config generation script can fill in.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree

image:
path: quay.io/clearwater_ims
tag: autobuild
hss:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see this being used anywhere. I may be misunderstanding how helm works, as we have relatively little experience with it. Can you explain what purpose this entry in the values.yaml has?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was used for creating config map. It seems that I forgot to add the template.

@@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the same file taken from the example helm package?
I don't believe we will need most of this, and probably don't need any of these entries. Do you agree?

If so i think we should just remove this file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree

README.md Outdated

To create a helm chart, you should simply run `./k8s-genchart`.

If you want to use your own docker registry, modify `clearwater/values.yaml`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're able to make the changes to build Helm config using the k8s-gencfg script, we won't need this :)
I'm assuming users will still have had to the up the config-map, as in the steps above? Haven't got helm installed on the rig i have available so haven't been able to test myself

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may include the ConfigMap with default values in helm chart. It is quite convenient to override the default values from command arguments.

@johadalin johadalin assigned yujunz and unassigned johadalin Feb 9, 2018
@yujunz
Copy link
Contributor Author

yujunz commented Feb 11, 2018

+1 for a single command and one source of truth. I will update the patch according to your comments :-)

@yujunz
Copy link
Contributor Author

yujunz commented Feb 12, 2018

Ready for review @johadalin

Tested in GKE.

@johadalin
Copy link
Contributor

@yujunz this looks great. All fits nicely into the gencfg script now.
Tested it out on our kubernetes rig as well, and it all seems to work as expected, at least for basic function. Hope to have some time soon to play around with the wider function that Helm might give us, for upgrading deployments etc. so thanks again for sending this change over :)

Given it all works, I'm going to merge this down. Do feel free to send over any more enhancements if you make them in future; if one of us doesn't pick it up that quickly, tag me/someone else on the project, or assign it to one of us if you can (not sure on the repo permissions here. I'll check into it)

@johadalin johadalin merged commit a2114cc into Metaswitch:master Feb 12, 2018
@yujunz yujunz deleted the helm branch February 12, 2018 13:48
@yujunz
Copy link
Contributor Author

yujunz commented Feb 12, 2018

assign it to one of us if you can (not sure on the repo permissions here. I'll check into it)

Thanks for the hint, @johadalin. It seems I don't have permission to make assignments.

@johadalin
Copy link
Contributor

Cool. I'll see if it's possible to change that, and if not, just @ tag us :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants