Skip to content

Commit 08bfe6d

Browse files
JAORMXclaude
andcommitted
Remove Helm conditionals from generated ClusterRole
The ClusterRole is generated by controller-gen and CI verifies it matches. Helm conditionals cannot be used in generated files. The operator code guards are the enforcement mechanism — the ClusterRole permissions are a ceiling, not a guarantee. The registry-api ClusterRole/ClusterRoleBinding (hand-managed) retain their conditionals. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 24dd7a8 commit 08bfe6d

2 files changed

Lines changed: 6 additions & 21 deletions

File tree

deploy/charts/operator/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ToolHive Operator Helm Chart
22

3-
![Version: 0.11.0](https://img.shields.io/badge/Version-0.11.0-informational?style=flat-square)
3+
![Version: 0.11.1](https://img.shields.io/badge/Version-0.11.1-informational?style=flat-square)
44
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
55

66
A Helm chart for deploying the ToolHive Operator into Kubernetes.
@@ -52,7 +52,7 @@ The command removes all the Kubernetes components associated with the chart and
5252
|-----|------|---------|-------------|
5353
| fullnameOverride | string | `"toolhive-operator"` | Provide a fully-qualified name override for resources |
5454
| nameOverride | string | `""` | Override the name of the chart |
55-
| operator | object | `{"affinity":{},"autoscaling":{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80},"containerSecurityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true,"runAsUser":1000,"seccompProfile":{"type":"RuntimeDefault"}},"env":{},"features":{"experimental":false,"registry":true,"server":true,"virtualMCP":true},"gc":{"gogc":75,"gomeglimit":"150MiB"},"image":"ghcr.io/stacklok/toolhive/operator:v0.11.0","imagePullPolicy":"IfNotPresent","imagePullSecrets":[],"leaderElectionRole":{"binding":{"name":"toolhive-operator-leader-election-rolebinding"},"name":"toolhive-operator-leader-election-role","rules":[{"apiGroups":[""],"resources":["configmaps"],"verbs":["get","list","watch","create","update","patch","delete"]},{"apiGroups":["coordination.k8s.io"],"resources":["leases"],"verbs":["get","list","watch","create","update","patch","delete"]},{"apiGroups":[""],"resources":["events"],"verbs":["create","patch"]}]},"livenessProbe":{"httpGet":{"path":"/healthz","port":"health"},"initialDelaySeconds":15,"periodSeconds":20},"nodeSelector":{},"podAnnotations":{},"podLabels":{},"podSecurityContext":{"runAsNonRoot":true},"ports":[{"containerPort":8080,"name":"metrics","protocol":"TCP"},{"containerPort":8081,"name":"health","protocol":"TCP"}],"proxyHost":"0.0.0.0","rbac":{"allowedNamespaces":[],"disableWorkloadRBAC":false,"scope":"cluster"},"readinessProbe":{"httpGet":{"path":"/readyz","port":"health"},"initialDelaySeconds":5,"periodSeconds":10},"replicaCount":1,"resources":{"limits":{"cpu":"500m","memory":"128Mi"},"requests":{"cpu":"10m","memory":"64Mi"}},"serviceAccount":{"annotations":{},"automountServiceAccountToken":true,"create":true,"labels":{},"name":"toolhive-operator"},"tolerations":[],"toolhiveRunnerImage":"ghcr.io/stacklok/toolhive/proxyrunner:v0.11.0","vmcpImage":"ghcr.io/stacklok/toolhive/vmcp:v0.11.0","volumeMounts":[],"volumes":[]}` | All values for the operator deployment and associated resources |
55+
| operator | object | `{"affinity":{},"autoscaling":{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80},"containerSecurityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true,"runAsUser":1000,"seccompProfile":{"type":"RuntimeDefault"}},"env":{},"features":{"experimental":false,"registry":true,"server":true,"virtualMCP":true},"gc":{"gogc":75,"gomeglimit":"150MiB"},"image":"ghcr.io/stacklok/toolhive/operator:v0.11.1","imagePullPolicy":"IfNotPresent","imagePullSecrets":[],"leaderElectionRole":{"binding":{"name":"toolhive-operator-leader-election-rolebinding"},"name":"toolhive-operator-leader-election-role","rules":[{"apiGroups":[""],"resources":["configmaps"],"verbs":["get","list","watch","create","update","patch","delete"]},{"apiGroups":["coordination.k8s.io"],"resources":["leases"],"verbs":["get","list","watch","create","update","patch","delete"]},{"apiGroups":[""],"resources":["events"],"verbs":["create","patch"]}]},"livenessProbe":{"httpGet":{"path":"/healthz","port":"health"},"initialDelaySeconds":15,"periodSeconds":20},"nodeSelector":{},"podAnnotations":{},"podLabels":{},"podSecurityContext":{"runAsNonRoot":true},"ports":[{"containerPort":8080,"name":"metrics","protocol":"TCP"},{"containerPort":8081,"name":"health","protocol":"TCP"}],"proxyHost":"0.0.0.0","rbac":{"allowedNamespaces":[],"disableWorkloadRBAC":false,"scope":"cluster"},"readinessProbe":{"httpGet":{"path":"/readyz","port":"health"},"initialDelaySeconds":5,"periodSeconds":10},"replicaCount":1,"resources":{"limits":{"cpu":"500m","memory":"128Mi"},"requests":{"cpu":"10m","memory":"64Mi"}},"serviceAccount":{"annotations":{},"automountServiceAccountToken":true,"create":true,"labels":{},"name":"toolhive-operator"},"tolerations":[],"toolhiveRunnerImage":"ghcr.io/stacklok/toolhive/proxyrunner:v0.11.1","vmcpImage":"ghcr.io/stacklok/toolhive/vmcp:v0.11.1","volumeMounts":[],"volumes":[]}` | All values for the operator deployment and associated resources |
5656
| operator.affinity | object | `{}` | Affinity settings for the operator pod |
5757
| operator.autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | Configuration for horizontal pod autoscaling |
5858
| operator.autoscaling.enabled | bool | `false` | Enable autoscaling for the operator |
@@ -68,7 +68,7 @@ The command removes all the Kubernetes components associated with the chart and
6868
| operator.gc | object | `{"gogc":75,"gomeglimit":"150MiB"}` | Go memory limits and garbage collection percentage for the operator container |
6969
| operator.gc.gogc | int | `75` | Go garbage collection percentage for the operator container |
7070
| operator.gc.gomeglimit | string | `"150MiB"` | Go memory limits for the operator container |
71-
| operator.image | string | `"ghcr.io/stacklok/toolhive/operator:v0.11.0"` | Container image for the operator |
71+
| operator.image | string | `"ghcr.io/stacklok/toolhive/operator:v0.11.1"` | Container image for the operator |
7272
| operator.imagePullPolicy | string | `"IfNotPresent"` | Image pull policy for the operator container |
7373
| operator.imagePullSecrets | list | `[]` | List of image pull secrets to use |
7474
| operator.leaderElectionRole | object | `{"binding":{"name":"toolhive-operator-leader-election-rolebinding"},"name":"toolhive-operator-leader-election-role","rules":[{"apiGroups":[""],"resources":["configmaps"],"verbs":["get","list","watch","create","update","patch","delete"]},{"apiGroups":["coordination.k8s.io"],"resources":["leases"],"verbs":["get","list","watch","create","update","patch","delete"]},{"apiGroups":[""],"resources":["events"],"verbs":["create","patch"]}]}` | Leader election role configuration |
@@ -96,8 +96,8 @@ The command removes all the Kubernetes components associated with the chart and
9696
| operator.serviceAccount.labels | object | `{}` | Labels to add to the service account |
9797
| operator.serviceAccount.name | string | `"toolhive-operator"` | The name of the service account to use. If not set and create is true, a name is generated. |
9898
| operator.tolerations | list | `[]` | Tolerations for the operator pod |
99-
| operator.toolhiveRunnerImage | string | `"ghcr.io/stacklok/toolhive/proxyrunner:v0.11.0"` | Image to use for Toolhive runners |
100-
| operator.vmcpImage | string | `"ghcr.io/stacklok/toolhive/vmcp:v0.11.0"` | Image to use for Virtual MCP Server (vMCP) deployments |
99+
| operator.toolhiveRunnerImage | string | `"ghcr.io/stacklok/toolhive/proxyrunner:v0.11.1"` | Image to use for Toolhive runners |
100+
| operator.vmcpImage | string | `"ghcr.io/stacklok/toolhive/vmcp:v0.11.1"` | Image to use for Virtual MCP Server (vMCP) deployments |
101101
| operator.volumeMounts | list | `[]` | Additional volume mounts on the operator container |
102102
| operator.volumes | list | `[]` | Additional volumes to mount on the operator pod |
103103
| registryAPI | object | `{"image":"ghcr.io/stacklok/thv-registry-api:v0.5.3","serviceAccount":{"annotations":{},"automountServiceAccountToken":true,"labels":{},"name":"toolhive-registry-api"}}` | All values for the registry API deployment and associated resources |

deploy/charts/operator/templates/clusterrole/role.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ rules:
1010
- configmaps
1111
- persistentvolumeclaims
1212
- secrets
13+
- serviceaccounts
1314
- services
1415
verbs:
1516
- create
@@ -19,20 +20,6 @@ rules:
1920
- patch
2021
- update
2122
- watch
22-
- apiGroups:
23-
- ""
24-
resources:
25-
- serviceaccounts
26-
verbs:
27-
- get
28-
- list
29-
- watch
30-
{{- if not .Values.operator.rbac.disableWorkloadRBAC }}
31-
- create
32-
- delete
33-
- patch
34-
- update
35-
{{- end }}
3623
- apiGroups:
3724
- ""
3825
resources:
@@ -95,7 +82,6 @@ rules:
9582
- get
9683
- list
9784
- watch
98-
{{- if not .Values.operator.rbac.disableWorkloadRBAC }}
9985
- apiGroups:
10086
- rbac.authorization.k8s.io
10187
resources:
@@ -109,7 +95,6 @@ rules:
10995
- patch
11096
- update
11197
- watch
112-
{{- end }}
11398
- apiGroups:
11499
- toolhive.stacklok.dev
115100
resources:

0 commit comments

Comments
 (0)