k8s icon indicating copy to clipboard operation
k8s copied to clipboard

support hooks

Open till opened this issue 6 months ago • 2 comments

Preflight checklist

Ory Network Project

No response

Describe your problem

Trying to figure out how to add hook files to the container.

The examples to use the kratos hooks usually look like this:

selfservice:
  flows:
    settings:
      after:
        profile:
          hooks:
            - hook: web_hook
              config:
                url: http://service
                method: POST
                body: file:///path/to/<something>.jsonnet
                can_interrupt: true

So this means /path/to/<something>.jsonnet has to be included or mounted into the container.

Describe your ideal solution

Ideally, the values would support this — similar to the schema files.

Workarounds or alternatives

Wrap the helm chart into another one, or prepend a helm chart (or manifests) to create k8s configs which I can then mount via extra volumes? I would rather maintain this in this helm chart instead of writing more helm.

Version

latest

Additional Context

No response

till avatar Feb 06 '24 16:02 till

Hello there! The current solution would be to supply the jsonnet files as extra config maps and mount into the containers using:

  extraVolumes: []
  # - name: my-volume
  #   secret:
  #     secretName: my-secret
  extraVolumeMounts: []
  # - name: my-volume
  #   mountPath: /etc/secrets/my-secret
  #   readOnly: true

We could add an option to add arbitrary data to a CM to make it easier and nor requite to sideload the config 🤔

Demonsthere avatar Feb 16 '24 08:02 Demonsthere

@Demonsthere You mean, currently I'd have to build the ConfigMap myself, right?

I think a general mechanism for the hooks would be great.

till avatar Feb 16 '24 09:02 till