From 8811224ef6ffcaa1bfa9fee6351a78111e76b037 Mon Sep 17 00:00:00 2001 From: lrangine <19699092+lokeshrangineni@users.noreply.github.com> Date: Wed, 17 Sep 2025 01:32:36 -0400 Subject: [PATCH 1/3] Move CRDs from templates/ to crds/ directory - Move CRD YAML files from templates/ to crds/ directory - This follows Helm best practices where CRDs in crds/ directory are automatically installed - CRDs will be available during validation time for other charts - No functional changes to the CRDs themselves Files moved: - toolhive.stacklok.dev_mcpregistries.yaml - toolhive.stacklok.dev_mcpservers.yaml - toolhive.stacklok.dev_mcptoolconfigs.yaml --- .../{templates => crds}/toolhive.stacklok.dev_mcpregistries.yaml | 0 .../{templates => crds}/toolhive.stacklok.dev_mcpservers.yaml | 0 .../{templates => crds}/toolhive.stacklok.dev_mcptoolconfigs.yaml | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename deploy/charts/operator-crds/{templates => crds}/toolhive.stacklok.dev_mcpregistries.yaml (100%) rename deploy/charts/operator-crds/{templates => crds}/toolhive.stacklok.dev_mcpservers.yaml (100%) rename deploy/charts/operator-crds/{templates => crds}/toolhive.stacklok.dev_mcptoolconfigs.yaml (100%) diff --git a/deploy/charts/operator-crds/templates/toolhive.stacklok.dev_mcpregistries.yaml b/deploy/charts/operator-crds/crds/toolhive.stacklok.dev_mcpregistries.yaml similarity index 100% rename from deploy/charts/operator-crds/templates/toolhive.stacklok.dev_mcpregistries.yaml rename to deploy/charts/operator-crds/crds/toolhive.stacklok.dev_mcpregistries.yaml diff --git a/deploy/charts/operator-crds/templates/toolhive.stacklok.dev_mcpservers.yaml b/deploy/charts/operator-crds/crds/toolhive.stacklok.dev_mcpservers.yaml similarity index 100% rename from deploy/charts/operator-crds/templates/toolhive.stacklok.dev_mcpservers.yaml rename to deploy/charts/operator-crds/crds/toolhive.stacklok.dev_mcpservers.yaml diff --git a/deploy/charts/operator-crds/templates/toolhive.stacklok.dev_mcptoolconfigs.yaml b/deploy/charts/operator-crds/crds/toolhive.stacklok.dev_mcptoolconfigs.yaml similarity index 100% rename from deploy/charts/operator-crds/templates/toolhive.stacklok.dev_mcptoolconfigs.yaml rename to deploy/charts/operator-crds/crds/toolhive.stacklok.dev_mcptoolconfigs.yaml From 95e9301baf5c981a177fdfa3df469dce505dff99 Mon Sep 17 00:00:00 2001 From: lrangine <19699092+lokeshrangineni@users.noreply.github.com> Date: Wed, 17 Sep 2025 10:47:16 -0400 Subject: [PATCH 2/3] Modified the actual manifest files to place the operator crds into the crds directory rather than in templates directory to follow the helm standards. --- .github/workflows/operator-ci.yml | 2 +- cmd/thv-operator/Taskfile.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/operator-ci.yml b/.github/workflows/operator-ci.yml index cb253bcf9..2c13be793 100644 --- a/.github/workflows/operator-ci.yml +++ b/.github/workflows/operator-ci.yml @@ -77,7 +77,7 @@ jobs: - name: Check for changes id: git-check run: | - git diff --exit-code deploy/charts/operator-crds/templates || echo "crd-changes=true" >> $GITHUB_OUTPUT + git diff --exit-code deploy/charts/operator-crds/crds || echo "crd-changes=true" >> $GITHUB_OUTPUT git diff --exit-code deploy/charts/operator/templates || echo "operator-changes=true" >> $GITHUB_OUTPUT - name: Fail if CRDs are not up to date diff --git a/cmd/thv-operator/Taskfile.yml b/cmd/thv-operator/Taskfile.yml index 5c1e109f3..9d13ec1bb 100644 --- a/cmd/thv-operator/Taskfile.yml +++ b/cmd/thv-operator/Taskfile.yml @@ -170,7 +170,7 @@ tasks: platforms: [windows] ignore_error: true # Windows has no mkdir -p, so just ignore error if it exists - go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.17.3 - - $(go env GOPATH)/bin/controller-gen crd webhook paths="./cmd/thv-operator/..." output:crd:artifacts:config=deploy/charts/operator-crds/templates + - $(go env GOPATH)/bin/controller-gen crd webhook paths="./cmd/thv-operator/..." output:crd:artifacts:config=deploy/charts/operator-crds/crds - $(go env GOPATH)/bin/controller-gen rbac:roleName=toolhive-operator-manager-role paths="./cmd/thv-operator/..." output:rbac:artifacts:config=deploy/charts/operator/templates/clusterrole operator-test: From 1cbf96b984db52c808fd15cb2723ebaff294d349 Mon Sep 17 00:00:00 2001 From: lrangine <19699092+lokeshrangineni@users.noreply.github.com> Date: Wed, 17 Sep 2025 12:28:34 -0400 Subject: [PATCH 3/3] Bumped the operator-crd version from 0.0.25 to 0.0.26 to fix the pr build failure. --- deploy/charts/operator-crds/Chart.yaml | 2 +- deploy/charts/operator-crds/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/charts/operator-crds/Chart.yaml b/deploy/charts/operator-crds/Chart.yaml index e5d8d0a02..3eb43a764 100644 --- a/deploy/charts/operator-crds/Chart.yaml +++ b/deploy/charts/operator-crds/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: toolhive-operator-crds description: A Helm chart for installing the ToolHive Operator CRDs into Kubernetes. type: application -version: 0.0.25 +version: 0.0.26 appVersion: "0.0.1" diff --git a/deploy/charts/operator-crds/README.md b/deploy/charts/operator-crds/README.md index a2d3e6758..661896d42 100644 --- a/deploy/charts/operator-crds/README.md +++ b/deploy/charts/operator-crds/README.md @@ -1,7 +1,7 @@ # ToolHive Operator CRDs Helm Chart -![Version: 0.0.25](https://img.shields.io/badge/Version-0.0.25-informational?style=flat-square) +![Version: 0.0.26](https://img.shields.io/badge/Version-0.0.26-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) A Helm chart for installing the ToolHive Operator CRDs into Kubernetes.