Creating an APIkey when declaratively creating a KongCredential

Hello,

I am trying to declaratively create a KongConsumer and accompanying KongCredential based on the documentation here: https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/references/custom-resources.md

It works fine, but I would like Kong to create the apikey for me in config of KongCredential (instead of me typing in a random password). Is there a best way to do this?

Please have a look at the example:

You can define your API key using the key parameter.

@hbagdi thanks for the quick response. Yup - is there a way to make this a secret/ hashed? It seems like a security risk to be able to just create keys when something like this is doable:

@Bosterito95

I totally get your fear but there is no way to do this as of now using a secret.
This is something that we are aware is very important to address and we have this as a high priority item on the roadmap.