Skip to content

fix runtimeconfigmap annotations #212

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

Merged
merged 2 commits into from
Sep 1, 2021
Merged

Conversation

kd7lxl
Copy link
Collaborator

@kd7lxl kd7lxl commented Sep 1, 2021

What this PR does:
#209 had a whitespace bug in the annotations section. It would eat the whitespace between the labels: and annotations:. Here's an example of the problem:

% helm template . -f ci/test-values.yaml -s templates/runtime-configmap.yaml --debug
install.go:173: [debug] Original chart version: ""
install.go:190: [debug] CHART PATH: /Users/thayward/go/src/github.com/cortexproject/cortex-helm-chart

---
# Source: cortex/templates/runtime-configmap.yaml

apiVersion: v1
kind: ConfigMap
metadata:
  name: RELEASE-NAME-cortex-runtime-config
  namespace: default
  labels:
    helm.sh/chart: cortex-0.6.0
    app.kubernetes.io/name: cortex
    app.kubernetes.io/instance: RELEASE-NAME
    app.kubernetes.io/version: "v1.9.0"
    app.kubernetes.io/managed-by: Helmannotations:
    foo: bar
data:
  runtime_config.yaml: |
    {}
Error: YAML parse error on cortex/templates/runtime-configmap.yaml: error converting YAML to JSON: yaml: line 11: mapping values are not allowed in this context
helm.go:81: [debug] error converting YAML to JSON: yaml: line 11: mapping values are not allowed in this context
YAML parse error on cortex/templates/runtime-configmap.yaml
helm.sh/helm/v3/pkg/releaseutil.(*manifestFile).sort
        helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:146
helm.sh/helm/v3/pkg/releaseutil.SortManifests
        helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:106
helm.sh/helm/v3/pkg/action.(*Configuration).renderResources
        helm.sh/helm/v3/pkg/action/action.go:165
helm.sh/helm/v3/pkg/action.(*Install).Run
        helm.sh/helm/v3/pkg/action/install.go:247
main.runInstall
        helm.sh/helm/v3/cmd/helm/install.go:242
main.newTemplateCmd.func2
        helm.sh/helm/v3/cmd/helm/template.go:82
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/[email protected]/command.go:852
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/[email protected]/command.go:960
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/[email protected]/command.go:897
main.main
        helm.sh/helm/v3/cmd/helm/helm.go:80
runtime.main
        runtime/proc.go:225
runtime.goexit
        runtime/asm_amd64.s:1371

Checklist

  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@kd7lxl kd7lxl marked this pull request as ready for review September 1, 2021 14:28
@kd7lxl kd7lxl requested a review from nschad September 1, 2021 14:28
@kd7lxl kd7lxl merged commit b454208 into cortexproject:master Sep 1, 2021
@kd7lxl kd7lxl deleted the runtime-config branch September 1, 2021 15:13
@nschad nschad mentioned this pull request Oct 5, 2021
1 task
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