You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Helm chart for the git-hubby Kubernetes operator, managing GitHub resources (organizations, repositories, teams, and security configurations) declaratively via Custom Resource Definitions (CRDs).
Overview
This chart deploys the git-hubby controller manager, a Kubernetes operator that reconciles GitHub resources based on custom resources in your cluster. It manages:
Key-value map of environment variables injected into the manager container via a ConfigMap
{}
Variable
Description
Possible Values
Default
ENABLE_WEBHOOKS
Enables or disables Kubernetes admission webhooks for validating Organization and Repository resources on create/update.
"true", "false"
"true" (enabled unless explicitly set to "false")
GITHUB_MEMBER_SUFFIX
A suffix appended to each team member username before matching/adding them on GitHub. Takes precedence over spec.memberSuffix on the Organization CR. Prefer using spec.memberSuffix for per-organization suffixes in multi-org setups.
Any string (e.g. "_company-name", "")
"" (no suffix)
REPOSITORY_FINALIZER_MODE
Controls what happens to a GitHub repository when its Repository CR is deleted from Kubernetes.
"ignore" (no action), "archive" (archive the repo), "delete" (delete the repo)
"ignore"
ENABLE_STARTUP_SPREADING
Enables startup spreading, which distributes reconciliation requests over time after a controller restart to avoid GitHub API rate limit spikes.
"true", "false"
"true"
SPREAD_INTERVAL_MINUTES
Length (in minutes) of the interval over which delayed reconciliations are randomly distributed. Delayed reconciliations are scheduled between (startup + SpreadPeriod) and (startup + SpreadPeriod + SpreadInterval). This value also serves as the requeue interval after a successful reconciliation.
Any positive integer
180
STARTUP_SPREAD_PERIOD_MINUTES
Duration (in minutes) after pod startup during which unchanged, healthy resources are delayed instead of reconciled immediately. Reconciliations for changed or unhealthy resources are never delayed.
Any positive integer
5
LOG_LEVEL
Sets the minimum log level. Overrides the --zap-log-level CLI flag. Note:warn is not supported due to limitations of the logr API used by controller-runtime — logr only provides Info (with verbosity levels) and Error; there is no distinct warn level. Use info to see all informational and warning-prefixed messages, or error to suppress them.
"debug", "info", "error"
"info"
Service Account
Parameter
Description
Default
serviceAccount.create
Create a ServiceAccount
true
serviceAccount.name
ServiceAccount name (defaults to fullname)
""
serviceAccount.annotations
Annotations for the ServiceAccount
{}
serviceAccount.secrets
Secrets to attach to the ServiceAccount
[]
serviceAccount.automount
Automount the ServiceAccount token
true
Metrics Service
Parameter
Description
Default
metricsService.type
Service type for the metrics endpoint
ClusterIP
metricsService.ports[0].name
Port name
https
metricsService.ports[0].port
Service port
8443
metricsService.ports[0].targetPort
Container target port
8443
metricsService.ports[0].protocol
Protocol
TCP
Webhooks
Parameter
Description
Default
webhooks.enabled
Enable or disable all Kubernetes admission webhook resources (ValidatingWebhookConfiguration, webhook Service, TLS Certificate, Issuer, and NetworkPolicy). Also sets the ENABLE_WEBHOOKS env var on the controller.
true
webhookService.type
Service type for the webhook endpoint
ClusterIP
TLS Certificates (cert-manager)
The chart manages two cert-manager Certificate resources:
Serving certificate — TLS for the webhook endpoint (Secret webhook-server-certificate). Only rendered when webhooks.enabled=true.
Metrics certificate — TLS for the metrics endpoint (Secret metrics-server-cert). Always rendered.
Self-signed Issuer
Parameter
Description
Default
selfSignedIssuer.enabled
Create a self-signed cert-manager Issuer (named <fullname>-selfsigned-issuer) and use it as the default issuer for both certificates. Set to false when bringing your own issuer.
true
When selfSignedIssuer.enabled=true and no explicit issuerRef is configured on a certificate, the chart automatically points that certificate at the built-in self-signed issuer. When selfSignedIssuer.enabled=false, an issuerRefmust be provided for each certificate that is rendered, otherwise the chart will fail with a descriptive error.
Metrics Certificate (metricsCert)
Parameter
Description
Default
metricsCert.issuerRef
cert-manager issuer reference. Overrides selfSignedIssuer for this certificate.
self-signed issuer
metricsCert.issuerRef.kind
Issuer kind (Issuer or ClusterIssuer)
—
metricsCert.issuerRef.name
Issuer name
—
metricsCert.issuerRef.group
Issuer API group (optional)
—
metricsCert.duration
Certificate validity duration (e.g. 2160h0m0s)
cert-manager default
metricsCert.renewBefore
How long before expiry cert-manager renews the certificate (e.g. 360h0m0s)
This chart uses helm-unittest for unit testing. Tests are located in the tests/ directory.
Running tests locally
# Install the helm-unittest plugin (one-time)
helm plugin install https://github.com/helm-unittest/helm-unittest.git
# Run all tests
helm unittest .
Tests are also executed automatically in CI on every push to main and on pull requests.
Architecture
The chart deploys:
Deployment — The controller manager pod running /manager with webhook and health probe endpoints
Services — A metrics service (port 8443) and a webhook service (port 443 → 9443)
RBAC — ClusterRoles and bindings for the manager, leader election, metrics auth, and per-CRD admin/editor/viewer roles
Certificates — An optional self-signed Issuer (controlled by selfSignedIssuer.enabled), a serving certificate for the webhook endpoint (when webhooks.enabled=true), and a metrics certificate — all via cert-manager. Both certificates fall back to the built-in self-signed issuer unless a custom issuerRef is configured.
ValidatingWebhookConfiguration — Admission webhooks validating Organization and Repository resources on CREATE/UPDATE
NetworkPolicy — Allows webhook traffic from kube-system namespace to the controller on port 9443
ServiceMonitor — Prometheus ServiceMonitor for scraping /metrics from the controller
CRDs — All custom resource definitions in crds/
RBAC Roles
The chart creates the following ClusterRoles for each CRD (organization, repository, team, codesecurityconfiguration, rulesetpreset, webhookpreset, webhookignorepreset, autolinkspreset):
Role
Permissions
*-admin-role
Full access (*) to the resource and get on status
*-editor-role
create, delete, get, list, patch, update, watch and get on status
*-viewer-role
get, list, watch and get on status
Additionally:
*-manager-role — Full operator permissions for all CRDs and secrets
*-leader-election-role — ConfigMaps, Leases, and Events for leader election
*-metrics-auth-role — TokenReviews and SubjectAccessReviews for metrics authentication
*-metrics-reader — Read access to /metrics non-resource URL
About
A Helm chart for deploying the git-hubby Operator.