Skip to content

yaml templates values "" are changed into null when published #53

@mikosa

Description

@mikosa

I have a spinnaker deploy step that deploys a kubernetes chart saved within (manifest source: text)
When I try to publish the pipeline template file the line under apiGroups with "" is replaced by "null" at one line and in the second line, apiGroups is deleted (because the value is null). But kubernetes chart requires the presence of apiGroups to work correctly, and value should be equal to ""

I tried different things including '', "", ~, [].... But was not able to get the needed ""
any ideas? or suggestions?

schema: "1"
id: kubernetes-job
protect: false
metadata:
description: This template does not have a description
name: kubernetes-job
owner: me@email.com
scopes:

  • myappname
    variables:
    configuration:
    parameters:
    stages:
  • config:
    account: dev
    cloudProvider: kubernetes
    manifestArtifactAccount: embedded-artifact
    manifests:
    • apiVersion: batch/v1
      kind: Job
      metadata:
      name: maintenance-job
      namespace: myns
      spec:
      completions: 1
      template:
      metadata:
      name: my-job
      spec:
      containers:
      - command:
      - bash
      - bashscript.sh
      image: docker.image.com
      name: mycontainer
      restartPolicy: Never
    • apiVersion: rbac.authorization.k8s.io/v1beta1
      kind: Role
      metadata:
      name: run-role-job
      namespace: myns
      rules:
      • apiGroups:
        • ""
        • extensions
        • apps
          resources:
        • deployments
        • configmaps
        • services
        • ingresses
        • secrets
          verbs:
        • get
        • list
        • delete
    • apiVersion: rbac.authorization.k8s.io/v1
      kind: RoleBinding
      metadata:
      name: run-maintenance
      namespace: myns
      roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: Role
      name: run-role-maintenance
      subjects:
      • apiGroup: ""
        kind: ServiceAccount
        name: default
        namespace: myns
        moniker:
        app: myapp
        relationships:
        loadBalancers: []
        securityGroups: []
        source: text
        dependsOn:
    • deleteManifest2
      id: deployManifest1
      inheritanceControl: {}
      inject: {}
      name: Deploy (Manifest
      type: deployManifest
  • config:
    account: dev
    cloudProvider: kubernetes
    kinds:
    • job
      location: myns
      manifestName: my-best-job
      options:
      cascading: true
      id: deleteManifest2
      inheritanceControl: {}
      inject: {}
      name: Delete (Manifest)
      type: deleteManifest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions