ory/hydra-maester

Created secret name should match `secretName` in spec

paulbdavis opened this issue · 4 comments

Creating a client with this manifest works correctly

apiVersion: hydra.ory.sh/v1alpha1
kind: OAuth2Client
metadata:
  name: my-app-oauth-client
spec:
  grantTypes:
    - client_credentials
    - implicit
    - authorization_code
    - refresh_token
  responseTypes:
    - id_token
    - code
    - token
  scope: "read write"
  secretName: my-app-oauth-client

But using the following causes the secret name to not match the one in the spec (the metadata.name of the client was changed)

apiVersion: hydra.ory.sh/v1alpha1
kind: OAuth2Client
metadata:
  name: my-app
spec:
  grantTypes:
    - client_credentials
    - implicit
    - authorization_code
    - refresh_token
  responseTypes:
    - id_token
    - code
    - token
  scope: "read write"
  secretName: my-app-oauth-client

With the above, the created secret is my-app instead of my-app-oauth-client

@paulbdavis I've tried applying both resources and everything seems fine. Could you please provide a step-by-step guide to reproduce this?

I think it's an issue with an older version being used in the current chart. The CRD defines the secret differently and presumably the controller handles it differently as well?

Confirmed, using 0.0.4 it works as expected