Skip to content

Feature Request: Allow configuration of the commit message for the GitStateStore #611

@RafaelOm

Description

@RafaelOm

When creating a Git Destination, the DestinationController performs an initial test write to the repository to validate connectivity and credentials. The commit message for this validation write is currently hardcoded (e.g., Initialising Kratix Destination) and cannot be configured through the Destination manifest.

This prevents the adoption of Kratix in environments with Git servers that enforce pre-receive hooks for commit message standards (e.g., requiring a Jira ticket ID like JWT-123: or a conventional commit format).

Current Behavior

  • A Destination resource pointing to a Git repository is created.

  • The DestinationController attempts to write a test document (.kratix-destination-health-check) to the repository to validate access.

  • The controller uses a hardcoded, non-configurable commit message for this action.

  • Our Git server's pre-receive hook rejects this commit because it does not match our required format.

  • The push fails, and the Destination resource never becomes ready, showing the following error in the logs:

    DestinationController: Failed to write test documents to State Store: command error on refs/heads/main: pre-receive hook declined

Desired Behavior

We would like the ability to configure the commit message used by the DestinationController. This would allow the validation commit to comply with our standards, enabling the Destination to be created successfully in a controlled environment.

Proposed Solution

A potential solution would be to add an optional commit field within the GitStateStore CRD
A simple commitMessagePrefix field, like:

apiVersion: platform.kratix.io/v1alpha1
kind: GitStateStore
metadata:
  name: default
spec:
  branch: main
  path: destinations/
  authMethod: ssh
  gitAuthor:
    name: kratix
    email: 
  commitMessagePrefix: "JWT-123"

Thank you,
Rafael

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