meshery-operator

by Meshery

Helm chartv1.0.83App v1.0.83Verified publisher

Meshery Operator chart.

About this chart

meshery-operator

Meshery Operator chart. Deploys the meshery-operator manager, which reconciles the Broker (NATS) and MeshSync custom resources.

The chart's version/appVersion and the CRD bundles under crds/ and files/ are kept in lockstep with meshery-operator releases by that repo's sync-downstream workflow — do not hand-edit them here.

CRD lifecycle

  • Install: Helm applies crds/crds.yaml before anything else, and the crds.updateJob pre-install hook server-side-applies the same bundle.

  • Upgrade: Helm never touches crds/ on upgrade; the crds.updateJob pre-upgrade hook is what refreshes the CRDs, so helm upgrade delivers schema updates to live clusters.

  • Uninstall: the CRDs deliberately survive helm uninstall - they are never owned by the release. The meshery-broker and meshery-meshsync custom resources the subcharts render are release-owned, and each carries a finalizer only the operator removes, so the customResourceCleanup pre-delete hook deletes them while the operator is still running (see Uninstall). To remove the CRDs permanently, including all custom resources of those types:

    kubectl delete crd brokers.meshery.io meshsyncs.meshery.io
    
  • Conversion: both CRDs serve v1alpha1 and v1alpha2 (storage) with conversion strategy None, which is exact while the two schemas are field-identical — no webhook and no cert-manager required. When the schemas diverge upstream, enable webhook.enabled (chart-generated self-signed certificate) or webhook.certManager.enabled (cert-manager v1) and the CRD update Job patches webhook conversion onto the CRDs.

MeshSync identity and RBAC

The operator's own ClusterRole (meshery-operator-role, bound to the meshery-operator ServiceAccount) is least-privilege: it can manage the Broker and MeshSync workloads, including the configmaps, secrets, and services those workloads need, but it grants no reads outside the resource types it manages. MeshSync, which the operator deploys from the MeshSync custom resource, needs the opposite: read access to everything it discovers, and no writes. The chart therefore gives it a separate role and ServiceAccount:

ObjectName
ServiceAccountmeshery-meshsync (meshsync.serviceAccount.name)
ClusterRolemeshery-meshsync-role
ClusterRoleBindingmeshery-meshsync-rolebinding

meshery-meshsync-role grants list/watch on every resource - MeshSync's watch-list is user-configurable and includes CRDs and cluster-scoped kinds - plus get on its own MeshSync resource, Namespaces and pods/log. It does not wildcard get, because get on * also authorizes the exec, attach, port-forward and proxy subresources (get on nodes/proxy reaches the kubelet API of every node). Add rules (for example create on pods/exec for Meshery's interactive terminal) with meshsync.rbac.extraRules.

Which ServiceAccount MeshSync runs as is set by one switch, meshsync.serviceAccount.dedicated:

  • false (the default while the chart deploys operator 1.0.6): the chart does not set MESHSYNC_SERVICE_ACCOUNT, and the operator runs MeshSync as meshery-operator (1.0.6 hard-codes it; later releases default to it). The chart binds the read-only meshery-meshsync-role to meshery-operator (meshery-meshsync-compat-rolebinding), so that ServiceAccount gains the role's reads (plus any meshsync.rbac.extraRules) and no wildcard writes. MeshSync, sharing it, still holds the operator's own write permissions, as it has since 1.0.0.
  • true: the chart passes MESHSYNC_SERVICE_ACCOUNT=<meshsync.serviceAccount.name> to the manager and drops the compatibility binding. Requires an operator release that includes meshery/meshery-operator#954; with an older operator MeshSync would stay on meshery-operator without discovery reads.

The default flips to true in the change that moves image.tag to the first operator release that includes meshery/meshery-operator#954. Until then, leaving it false with a newer operator is safe: MeshSync simply keeps running as meshery-operator with the role's read access. The ServiceAccount must exist in the MeshSync resource's namespace, which is the release namespace.

Broker exposure

The meshery-broker subchart renders the Broker custom resource and can set how the Broker is exposed. An out-of-cluster Meshery Server must reach the Broker on 4222/tcp:

helm upgrade --install meshery-operator meshery/meshery-operator -n meshery \
  --set meshery-broker.service.type=LoadBalancer \
  --set 'meshery-broker.service.loadBalancerSourceRanges={10.0.0.0/8}'

Unset meshery-broker.service.* and meshery-broker.version fields are omitted from the resource, keeping the operator defaults (ClusterIP, the pinned NATS release) and leaving them free for Meshery Server, which server-side-applies spec.service and spec.version from its controllers configuration under the field manager meshery-server. Set each field in one place only: when both set it, Helm 4 (server-side apply) fails the upgrade with a field-ownership conflict, and Helm 3 lets whichever wrote last win. To return to the default exposure, set meshery-broker.service.type=ClusterIP in the same upgrade that removes the other service values, rather than unsetting every field. Operator 1.0.6 writes an empty spec.service back to the Broker and co-owns it, so under Helm 4 removing the last chart-set field there (for example with --reset-values) fails the upgrade with spec.service ... must be of type object: "null". Helm 3, or Helm 4 with --server-side=false, is not affected. loadBalancerClass and loadBalancerSourceRanges require type: LoadBalancer; the chart refuses to render them otherwise. The resource is rendered as meshery.io/v1alpha1: both served versions are field-identical, and the storage version v1alpha2 would break helm upgrade from charts whose CRDs predate it, because Helm maps a manifest's apiVersion before the CRD update Job runs. See charts/meshery-broker for every field.

Uninstall

helm uninstall would delete the operator and the Broker and MeshSync custom resources in the same pass, leaving the resources stuck Terminating on finalizers no controller is left to remove. The customResourceCleanup pre-delete hook Job runs first, while the operator is still up: it deletes the custom resources this release owns (identified by the release's Helm ownership annotation, so a helm template | kubectl apply render of the Job deletes nothing) and waits up to 90 seconds for the operator to process the finalizers. If the operator is not reconciling, it removes the finalizers instead; everything the operator created for those resources carries a controller ownerReference and is garbage-collected. The Job uses crds.updateJob.image and a Role limited to brokers and meshsyncs in the release namespace, and fails only on API errors, in which case it is kept for inspection and helm uninstall stops. Set customResourceCleanup.enabled=false to opt out.

Maintainers

NameEmailUrl
Meshery Authors[email protected]
aisuko[email protected]
maintainers[email protected]

Requirements

RepositoryNameVersion
meshery-broker0.5.0
meshery-meshsync0.5.0

Values

KeyTypeDefaultDescription
affinityobject{}
annotationsobject{}Extra annotations for the manager Deployment
crds.updateJob.enabledbooltruePre-install/pre-upgrade hook Job that server-side-applies files/crds.yaml; disabling means upgrades will NOT refresh CRDs
crds.updateJob.image.pullPolicystring"IfNotPresent"
crds.updateJob.image.repositorystring"alpine/k8s"kubectl-capable image for the CRD update Job
crds.updateJob.image.tagstring"1.35.6"
customResourceCleanup.enabledbooltruePre-delete hook Job that deletes this release's Broker and MeshSync resources while the operator still runs, so their finalizers are processed (see Uninstall)
envobject{}Extra environment variables for the manager container. ENABLE_WEBHOOKS and MESHSYNC_SERVICE_ACCOUNT are chart-managed and rejected here
fullnameOverridestring"meshery-operator"
image.pullPolicystring"IfNotPresent"
image.repositorystring"meshery/meshery-operator"
image.tagstring"1.0.6"Pinned operator release, stamped by the sync workflow. Kept explicit because server-release chart publishing re-stamps appVersion with the server tag; empty falls back to the chart appVersion
imagePullSecretslist[]
ingress.annotationsobject{}
ingress.enabledboolfalse
ingress.hosts[0].hoststring"chart-example.local"
ingress.hosts[0].pathslist[]
ingress.tlslist[]
leaderElection.enabledbooltrueLeader election (adds the leases Role/RoleBinding and --enable-leader-election)
meshery-broker.enabledbooltrue
meshery-broker.fullnameOverridestring"meshery-broker"
meshery-meshsync.enabledbooltrue
meshery-meshsync.fullnameOverridestring"meshery-meshsync"
meshsync.rbac.extraRuleslist[]Rules appended to the otherwise read-only meshery-meshsync-role, e.g. create on pods/exec for the interactive terminal
meshsync.serviceAccount.createbooltrueCreate the MeshSync ServiceAccount; when false it must already exist in the release namespace
meshsync.serviceAccount.dedicatedboolfalseRun MeshSync as meshsync.serviceAccount.name by passing MESHSYNC_SERVICE_ACCOUNT to the operator (needs an operator with meshery/meshery-operator#954); while false, the read-only role is bound to meshery-operator instead (see MeshSync identity and RBAC)
meshsync.serviceAccount.namestring"meshery-meshsync"MeshSync's ServiceAccount (DNS-1123 name), bound to the read-only meshery-meshsync-role
nameOverridestring""
nodeSelectorobject{}
podAnnotationsobject{}
podSecurityContextobjectrunAsNonRoot 65532, RuntimeDefault seccompParity with the operator's own config/manager
replicaCountint1
resourcesobjectlimits 500m/256Mi, requests 100m/64MiParity with the operator's own config/manager
securityContextobjectno privilege escalation, read-only rootfs, drop ALL
service.annotationsobject{}
service.portint8443TLS metrics endpoint (authn/authz-filtered; bind scrapers to the meshery-metrics-reader ClusterRole)
service.typestring"ClusterIP"
serviceAccount.createbooltrue
serviceAccount.namestring"meshery-operator"
tolerationslist[]
webhook.certManager.enabledboolfalseIssue the webhook serving cert with cert-manager (cert-manager.io/v1) + CA injection instead of the chart-generated self-signed certificate
webhook.enabledboolfalseServe v1alpha1<->v1alpha2 CRD conversion through the operator's webhook; not required while the schemas are field-identical

Deploy meshery-operator with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has meshery-operator on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartmeshery-operator is pinned at v1.0.83 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply