operator icon indicating copy to clipboard operation
operator copied to clipboard

Documentation is incomplete, EmbeddedIngress doesn't list all fields

Open flokli opened this issue 4 years ago • 3 comments
trafficstars

I'd like to use VMAuth to expose some of victoria metrics outside the cluster.

I created VMAuth and VMUser according to the quick start.

The Ingress gets created.

However, for cert-manager to create a certificate, I'd also need to add a cert-manager.io/cluster-issuer=… annotation (and in general, I might want to add other annotations as well).

Could EmbeddedIngress get an annotations field, so setting arbitrary annotations becomes possible?

flokli avatar Oct 20 '21 11:10 flokli

Hello, its already supported, but its lack of documentation how to use it. I'm thinking about some blog post or guide, how to use it.

kind: VMAuth
spec:
 ingress:
   annotations:
    cert-manager.io/cluster-issuer: some-value

https://github.com/VictoriaMetrics/operator/blob/master/api/v1beta1/vmauth_types.go#L170

api doc https://github.com/VictoriaMetrics/operator/blob/master/docs/api.MD#embeddedingress

doesn't include this field, cause doc generator cannot use embedded structure field.

f41gh7 avatar Oct 20 '21 18:10 f41gh7

Indeed - a kubectl explain vmauth.spec.ingress does list that endpoint.

Could we switch to something like https://github.com/ahmetb/gen-crd-api-reference-docs instead?

It's being used to render the cert-manager and knative API reference docs, so should probably support everything we need.

flokli avatar Oct 20 '21 19:10 flokli

I've tried it with no luck - it crashes and produces some strange errors.

Have own doc-print impl - https://github.com/f41gh7/doc-print

I'll try to add embedded structs parsing their.

f41gh7 avatar Oct 21 '21 20:10 f41gh7

I see that doc generation is no longer a problem now. I am closing the issue as irrelevant.

Amper avatar Jul 27 '23 14:07 Amper