Skip to content

feat: Add App CRD on MVP branch#1826

Open
jzywiecki wants to merge 4 commits intomvp/app-framework-v1from
mvp/app-framework-v1-app-crd
Open

feat: Add App CRD on MVP branch#1826
jzywiecki wants to merge 4 commits intomvp/app-framework-v1from
mvp/app-framework-v1-app-crd

Conversation

@jzywiecki
Copy link
Copy Markdown

@jzywiecki jzywiecki commented Apr 8, 2026

Description

This PR adds the new App custom resource definition to the operator.

Key Changes

  • Added the new App API type under enterprise.splunk.com/v4
  • Generated and registered the App CRD
  • Added a sample App manifest and wired it into sample kustomization
  • Regenerated deepcopy and CRD artifacts to reflect the final schema

Testing and Verification

  • Regenerated manifests and deepcopy code with make manifests generate
  • Verified the API changes
  • Checked the generated CRD schema for the new spec and status fields
  • Manual testing of creating the CR

Related Issues

  • SPL-298478

Screenshots

Pasted Graphic 1 image

PR Checklist

  • Code changes adhere to the project's coding standards.
  • Relevant unit and integration tests are included.
  • Documentation has been updated accordingly.
  • All tests pass locally.
  • The PR description follows the project's guidelines.

@jzywiecki jzywiecki requested a review from naimulh247 April 8, 2026 12:58
@naimulh247
Copy link
Copy Markdown

There are some merge conflicts, can we rebase and push again

Copy link
Copy Markdown

@naimulh247 naimulh247 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might want to consider using pointers as part of the app_types.go to know if user defined the field or not

const (
// AppPausedAnnotation is the annotation that pauses the reconciliation (triggers
// an immediate requeue)
AppPausedAnnotation = "app.enterprise.splunk.com/paused"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its not part of the enterprise group anymore :)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for catching that! Changed that to apps.splunk.com/paused

Signed-off-by: jzywieck <jzywiecki@splunk.com>
@jzywiecki jzywiecki force-pushed the mvp/app-framework-v1-app-crd branch from bffa2f9 to 86350ea Compare April 10, 2026 13:32
Signed-off-by: jzywieck <jzywiecki@splunk.com>
Copy link
Copy Markdown
Collaborator

@vivekr-splunk vivekr-splunk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found two blocking issues in the current App CRD/controller shape.

TargetRef AppTargetRef `json:"targetRef"`

// +kubebuilder:validation:Required
SourceRef AppSource `json:"sourceRef"`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think sourceRef needs to be a reference type rather than an embedded AppSource resource. In the generated schema and sample, each App now carries an entire AppSource object inline, which bypasses the separate AppSource CRD/controller/status and makes it hard to share one source across multiple apps. From the operator product point of view, that looks like the wrong API contract to publish.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats right, instead of embedding I have aligned it with ERD and created referencing of it

//
// For more details, check Reconcile and its Result here:
// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.21.0/pkg/reconcile
func (r *AppReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks user-visible too early to me. cmd/main.go wires the App controller into the manager, but Reconcile still returns immediately without reading the App, updating status, or driving any app-install behavior. As merged, we would expose an App CRD that appears supported but does nothing once created, which does not seem safe from the operator product point of view.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be fine for now, at the moment we are just figuring out what the CRD / user fields we need... the reconciliation working would be a different MR

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @vivekr-splunk, this changes are not planned to be merged to the main branch yet, we are working on a separate app-deployment branch and its one of the first steps to getting closer to creating this CRD (its part of a M1). The controller implementation is part of the further steps, for now the changes you are refering to are the stub implementation from operator-sdk

Signed-off-by: jzywieck <jzywiecki@splunk.com>
@jzywiecki jzywiecki force-pushed the mvp/app-framework-v1-app-crd branch from 99d10eb to f5518fe Compare April 10, 2026 15:17
Signed-off-by: jzywieck <jzywiecki@splunk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants