Setting transparency for no data in raster in geoserver

I'm not sure if this question is still relevant to anyone, but I found a solution using YSLD. Check out the documentation on the raster symbolizer and note the "intervals" color ramp. You can simply set the interval containing the no-data value to transparent. For example, if your no-data value is something north of 36000:

title: Discrete Ramp'
- name: raster
  - name: raster
  - symbolizers:
    - raster:
        opacity: 1.0
          type: intervals
          - ['#000000',0, 36000,'']

The format here is [<color>,<transparency>,<cell value>,<symbol>]. You can, of course, add more entries to symbolize other ranges of values. I hope this helps, even though it's a few years too late. :)