Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common chart to rule values with Helm #48

Merged
merged 18 commits into from Feb 14, 2019

Conversation

Projects
None yet
2 participants
@igdianov
Copy link
Member

igdianov commented Feb 12, 2019

This PR fixes gateway host and keycloak url values duplication problem, so that users can install Activiti Helm chart with a single command:

helm install --name activiti . --set "global.gateway.host=activiti-cloud-gateway.1.2.3.4.nip.io"

  • We can also use the following templated global values:
global:
  gateway:
    host: "{{ .Release.Name }}.{{ .Release.Namespace }}.{{ .Values.global.gateway.domain }}"
    domain: "REPLACEME"

And then run helm upgrade example . --install --set global.gateway.domain=1.2.3.4.nip.io --debug to automatically install and expose all ingresses i.e. Keycloak, Gateway, Modeler, UI, Graphiql via example.jx-staging.1.2.3.4.nip.io single domain.

This will also enable to create Helm chart Quickstarts for Jx CI/CD import with templated values that use expose controller domain and http config, i.e.

expose: 
   config:
     domain: &domain "1.2.3.4.nip.io"
     http: &http true

global:
  keycloak:
    realm: "activiti"
    resource: "activiti"
    client: "activiti"
  gateway:
    host: "{{ .Release.Name }}.{{ .Release.Namespace }}.{{ .Values.global.gateway.domain }}"
    domain: *domain
    http: *http

This will enable to create Activiti Cloud Platform Quickstart: Activiti/Activiti#2448

By default, when Keycloak is deployed, it is exposed on the same Gateway host. It is possible to customize Keycloak host via global.keycloak.host value to expose its ingress on different subdomain, i.e. "activiti-keycloak.{{ .Release.Namespace }}.{{ .Values.global.gateway.domain }}".

  • It is also, now possible to template any ingress path, i.e. path: "/{{ .Release.Namespace }}-query" using common.ingress-path template.

  • added support for HTTPS that works with K8s cert-manager using global.gateway.http=false value key. Part of Activiti/Activiti#2388

  • Added icon to all charts: fixes Activiti/Activiti#2469

  • Added NOTES.txt template:

NOTES:
               _   _       _ _   _    _____ _                 _
     /\       | | (_)     (_) | (_)  / ____| |               | |
    /  \   ___| |_ ___   ___| |_ _  | |    | | ___  _   _  __| |
   / /\ \ / __| __| \ \ / / | __| | | |    | |/ _ \| | | |/ _` |
  / ____ \ (__| |_| |\ V /| | |_| | | |____| | (_) | |_| | (_| |
 /_/    \_\___|\__|_| \_/ |_|\__|_|  \_____|_|\___/ \__,_|\__,_|
 Version: 1.0

Thank you for installing activiti-cloud-full-example-1.0.1

Your release is named example.

To learn more about the release, try:

  $ helm status example
  $ helm get example

Get the application URLs:

Activiti Keycloak : http://activiti-cloud-gateway.jx-staging.35.203.140.186.nip.io/auth
Activiti Gateway  : http://activiti-cloud-gateway.jx-staging.35.203.140.186.nip.io/
Activiti Modeler  : http://activiti-cloud-gateway.jx-staging.35.203.140.186.nip.io/activiti-cloud-modeling
Activiti GraphiQL : http://activiti-cloud-gateway.jx-staging.35.203.140.186.nip.io/graphiql

To see deployment status, try:

  $ kubectl get pods -n jx-staging
  • Added Makefile to automate Helm tasks: up, build, lint, template, install, delete.

The common chart approach is based on the following projects, with some tweaks:

https://medium.com/devopslinks/dry-helm-charts-for-micro-services-db3a1d6ecb80

This approach should be combined with https://github.com/helm/charts/tree/master/incubator/common to enable DRY best practices and eliminate resources and values duplication amount peer and parent global values.

@igdianov igdianov self-assigned this Feb 12, 2019

@igdianov igdianov requested review from ryandawsonuk and salaboy Feb 12, 2019

@igdianov igdianov force-pushed the igdianov-common-chart branch from b9532c2 to 02f58cc Feb 12, 2019

@igdianov igdianov added the WIP label Feb 13, 2019

@igdianov igdianov force-pushed the igdianov-common-chart branch from eb302f2 to 88059f1 Feb 13, 2019

@igdianov igdianov changed the title Common chart to rule with Helm Common chart to rule values with Helm Feb 13, 2019

@igdianov igdianov added ready-for-review and removed WIP labels Feb 13, 2019

@igdianov igdianov force-pushed the igdianov-common-chart branch from 88059f1 to b419b7d Feb 13, 2019

@ryandawsonuk ryandawsonuk merged commit a6a6815 into master Feb 14, 2019

1 check passed

license/cla Contributor License Agreement is signed.
Details

@igdianov igdianov deleted the igdianov-common-chart branch Feb 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.