agilestacks / components

Stack components in Hub format
Apache License 2.0
8 stars 2 forks source link

postgresql component breaks automation-hub #337

Open akranga opened 4 years ago

akranga commented 4 years ago

Automation Hub throws:

{
  cause: [Error: getaddrinfo ENOTFOUND automation-hub-db.automation-hub.svc.cluster.local automation-hub-db.automation-hub.svc.cluster.local:5432] {
      at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)
    errno: 'ENOTFOUND',
    code: 'ENOTFOUND',
    syscall: 'getaddrinfo',
    hostname: 'automation-hub-db.automation-hub.svc.cluster.local',
    host: 'automation-hub-db.automation-hub.svc.cluster.local',
    port: 5432
  },
  isOperational: true,
  errno: 'ENOTFOUND',
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'automation-hub-db.automation-hub.svc.cluster.local',
  host: 'automation-hub-db.automation-hub.svc.cluster.local',
  port: 5432,
  'constructor$': [Function: Error] {
    stackTraceLimit: 16,
    prepareStackTrace: undefined
  }
}

As it expects postgres named as component.postgresql.name but getting instead ${component-postgresql-name}-postgresql where postgresql is a helm release name.

akranga commented 4 years ago

Quick and dirty 1f332612 due to lack of resources such as environment and time

Might revisit later with proper implementation where automation-hub should rely on connection parameters exported by the component instead try to guess it's name