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

Fix incorrectly indented podAnnotations #843

Merged
merged 2 commits into from
Aug 21, 2020

Conversation

pmalek-sumo
Copy link
Contributor

Description

Previously add podAnnotations weren't properly indented everywhere producing things like:

# Source: sumologic/templates/setup/setup-job.yaml
apiVersion: batch/v1
kind: Job
metadata:
  name: RELEASE-NAME-sumologic-setup
  namespace: default
  annotations:
    helm.sh/hook: pre-install,pre-upgrade
    helm.sh/hook-weight: "3"
    helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
  annotationforall: value1 ## <--- This should be indented with 2 more spaces
  labels:
    app: RELEASE-NAME-sumologic
    chart: "sumologic-1.2.0-beta.1"
    release: "RELEASE-NAME"
    heritage: "Helm"
spec:
  template:
    metadata:
      labels:
    spec:
...

This PR addresses that.

Additionally it fixes annotations in deploy/helm/sumologic/templates/setup/setup-job.yaml by moving it from metadata.annotations to metadata.spec.template.metadata.annotations.

To test the solution, I've perfomed not helm template as before which doesn't validate the yaml against the cluster but with helm template --validate to check the templates and yaml against the running k8s cluster.

Testing performed
  • ci/build.sh
  • Redeploy fluentd and fluentd-events pods
  • Confirm events, logs, and metrics are coming in

@perk-sumo
Copy link
Contributor

Let me reopen the PR to kick Travis build.

@perk-sumo perk-sumo closed this Aug 21, 2020
@perk-sumo perk-sumo reopened this Aug 21, 2020
Copy link
Contributor

@perk-sumo perk-sumo left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@perk-sumo perk-sumo added this to the v1.2 milestone Aug 21, 2020
@perk-sumo perk-sumo merged commit 0401db2 into master Aug 21, 2020
@perk-sumo perk-sumo deleted the fix-podAnnotations-not-showing-up branch August 21, 2020 10:16
@@ -4,17 +4,20 @@ kind: Job
metadata:
name: {{ template "sumologic.metadata.name.setup.job" . }}
namespace: {{ .Release.Namespace }}
annotations:
{{ include "sumologic.annotations.app.setup.helmsh" "3" | indent 4 }}
Copy link
Contributor

Choose a reason for hiding this comment

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

The helmsh annotations shouldn't be moved to spec

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.

None yet

4 participants