Skip to content

Add a CreationTimePatchConfiguration CRD #41

@QuingKhaos

Description

@QuingKhaos

Instead of manually configuring the creation-time patch webhook, the patch-operator controller could provide a CreationTimePatch CRD and a controller, which watches those CRs and configures the webhook accordingly.

apiVersion: redhatcop.redhat.io/v1alpha1
kind: CreationTimePatchConfiguration
metadata:
  name: example
spec:
  rules:
    - apiVersion: v1
      resources:
        - configmaps
        - secrets
    - apiVersion: binding.operators.coreos.com/v1alpha1
      resources:
        - servicebindings

I would suggest to support multiple CreationTimePatchConfiguration CRs, which are then consolidated into a single webhook configuration, but having a singleton CRD is also okay.

Multiple CRs would support the use-case were I can configure a new CRD created by some operator installed in the same GitOps subproject/subdir which installed the other operator and don't have to modify another place to support that. But this may be an advanced use-case and not sure how easy it is to map multiple CRs to one resource in the end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions