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

using include statement vs template for better yaml support #264

Merged
merged 1 commit into from
Oct 30, 2019

Conversation

djsly
Copy link
Contributor

@djsly djsly commented Oct 30, 2019

Description

#263

Based on the following DOC, included is preferred for multiline template
https://helm.sh/docs/chart_template_guide/#the-include-function

The new generated yamls are now much better

# Source: sumologic/templates/events-deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: release-name-sumologic-events
  labels:
    app: release-name-sumologic-events
    chart: "sumologic-0.10.0"
    release: "release-name"
    heritage: "Tiller"
spec:
  selector:
    matchLabels:
      app: release-name-sumologic-events
  template:
    metadata:
      labels:
        app: release-name-sumologic-events
        chart: "sumologic-0.10.0"
        release: "release-name"
        heritage: "Tiller"
    spec:
# Source: sumologic/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: release-name-sumologic
  labels:
    app: release-name-sumologic
    chart: "sumologic-0.10.0"
    release: "release-name"
    heritage: "Tiller"
spec:
  selector:
    matchLabels:
      app: release-name-sumologic
  replicas: 3
  template:
    metadata:
      labels:
        app: release-name-sumologic
        chart: "sumologic-0.10.0"
        release: "release-name"
        heritage: "Tiller"
    spec:
Testing performed
  • ci/build.sh
  • Redeploy fluentd and fluentd-events pods
  • Confirm events, logs, and metrics are coming in

@djsly
Copy link
Contributor Author

djsly commented Oct 30, 2019

@rvmiller89 here's another one for you to review :)

will I be able to helm install using a beta release ?

Copy link
Contributor

@rvmiller89 rvmiller89 left a comment

Choose a reason for hiding this comment

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

LGTM, unfortunately we're still struggling with teaching Travis CI to generate and commit changed yaml files for PRs that come from external repos (which don't have access to secret variables).

That said, this change actually doesn't produce any diff in our generated files so I think we can merge it as-is.

@rvmiller89
Copy link
Contributor

In answer to your question about testing using a beta release, I've been doing this by navigating to sumologic-kubernetes-collection/deploy/helm/sumologic in the checked out repo, doing helm install . and overriding the image in values.yaml, e.g.

helm install . --name collection --namespace sumologic -f values.yaml

values.yaml

image:
  repository: sumologic/kubernetes-fluentd
  tag: 0.9.9-alpha
  pullPolicy: IfNotPresent

@rvmiller89 rvmiller89 merged commit 1037502 into SumoLogic:master Oct 30, 2019
@djsly
Copy link
Contributor Author

djsly commented Oct 30, 2019

@rvmiller89 thanks, so I guess the charts are not published for Alpha tags ? the Release process is the only way to release charts to your helm repo ?

@rvmiller89
Copy link
Contributor

Right, we only publish new charts right now for releases (major or minor), but not alpha releases. This might change in the future.

Helm chart is published: https://github.com/SumoLogic/sumologic-kubernetes-collection/blob/master/ci/build.sh#L146

Chart location (gh-pages branch): https://github.com/SumoLogic/sumologic-kubernetes-collection/tree/gh-pages

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

Successfully merging this pull request may close these issues.

2 participants