Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Dummy params needed to render multiple yaml components #789

@shomron

Description

@shomron

/bug

When rendering multiple YAML components (separate files), ksonnet emits and error if there are no component parameters defined for any component, even a fake one.

ERROR find objects: patching YAML/JSON component: RUNTIME ERROR: Field does not exist: components
	patchJSON:3:19-35	thunk from <function <anonymous>>
	<std>:1182:21-22	thunk from <function <anonymous>>
	<std>:1182:5-33	function <anonymous>
	patchJSON:3:5-47	function <anonymous>
	Top-level function

Related to #788

Version

$ ks version
ksonnet version: 0.12.0-rc1
jsonnet version: v0.10.0
client-go version:

Reproduction

ks init test ; cd test

cat >components/one.yaml <<EOF
apiVersion: v1
kind: Namespace
metadata:
  name: heptio-contour
EOF

cat >components/two.yaml <<EOF
apiVersion: v1
kind: ServiceAccount
metadata:
  name: contour
  namespace: heptio-contour
EOF

# Show error
ks show default

# Set dummy component params
cat > components/params.libsonnet <<EOF
{
  global: {
  },
  components: {
    foo: {},
  },
}
EOF

# Show success
ks show default

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions