Skip to content
This repository was archived by the owner on Jun 26, 2024. It is now read-only.
This repository was archived by the owner on Jun 26, 2024. It is now read-only.

customEnvVar templates getting incorrectly resolved to "<no value>" #354

@navidsh

Description

@navidsh

I installed Service Binding Operator v0.1.0-249 from OperatorHub with the default configuration (watching all namespaces). I tried the examples/nodejs_postgresql example and added two env under customEnvVar.

apiVersion: apps.openshift.io/v1alpha1
kind: ServiceBindingRequest
metadata:
  name: binding-request
  namespace: service-binding-demo
spec:
  applicationSelector:
    group: apps
    resource: deployments
    resourceRef: nodejs-rest-http-crud
    version: v1
  backingServiceSelector:
    group: postgresql.baiju.dev
    kind: Database
    resourceRef: db-demo
    version: v1alpha1
  customEnvVar:
    - name: MY_DB_NAME
      value: '{{ .spec.dbName }}'
    - name: MY_DB_IP
      value: '{{ .status.dbConnectionIP }}'

A secret got created and has the custom environment variables but with <no value> instead of actual values from my backing service CR:

data:
...
  MY_DB_IP: <no value>
  MY_DB_NAME: <no value>

I also tried on running the operator locally based on master@24a8d0e, and see the same behavior. This used to work on v0.0.24-214.

Metadata

Metadata

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