voxpupuli / puppet-consul

A Puppet Module to Manage Consul
Apache License 2.0
121 stars 315 forks source link

module doesn't support grpc checks #630

Closed tedkozma closed 8 months ago

tedkozma commented 1 year ago

the consul::validate_checks function doesn't support grpc checks

How to reproduce (e.g Puppet code you use)

Try to set a check:

consul::services:
  'somegrpcservice':
    address: "%{facts.networking.ip}"
    checks:
      - name: 'check-somegrpcservice'
        grpc: "127.0.0.1:6000"
        grpc_use_tls: false
        interval: 10s
    port: 42
    tags:
      - 'sometag'
    meta:
      SLA: 1

What are you seeing

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, One of ttl, script, tcp, or http must be defined. (file: /etc/puppetlabs/code/environments/staging/modules/consul/manifests/service.pp, line: 106, column: 3)

What behaviour did you expect instead

I expect this to set up a grpc check I know consul supports. It works when I set it manually, without puppet.

Output log

Any additional information you'd like to impart