backstage template parameter, not able to substitute the additionalProperties values

107 views Asked by At

I have created a template withenter image description here additionalproperties in backstage From backstage ui, it is taking the values, but rendered catalog-info.yaml is showing empty, is there something wrong in my config? Thank you

apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: "test"
  description: >
    extraLabels: 
  annotations:
    backstage.io/kubernetes-id: "test"
spec:
  type: service
  owner: xxx
  lifecycle: dev 

I used https://rjsf-team.github.io/react-jsonschema-form/

apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
  name: Namespace-Creation
spec:
  type: library
  parameters:
    - title: Application Details
      properties:
        extraLabels:
          title: Extra Labels
          type: object
          description: Extra labels to be added to the namespace
          optional: true
          additionalProperties:
            type: string
   steps:
    # Each step executes an action, in this case one templates files into the working directory.
    - id: fetch-base
      name: Fetch Base
      action: fetch:template
      input:
        url: ./content
        values:
          extraLabels: ${{ parameters.extraLabels }}

catalog-info.yaml

apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: ${{ values.namespace | dump | trim }}
  description: >
    extraLabels: ${{ values.extraLabels }}
  annotations:
      backstage.io/kubernetes-id: ${{ values.namespace | dump | trim }}
spec:
  type: service
  owner: xxx
  lifecycle: dev

0

There are 0 answers