### Helm Install Latest Stable Release Source: https://github.com/seatgeek/buildkit-operator/blob/main/README.md Installs the latest stable version of the buildkit-operator using Helm. ```bash helm install buildkit-operator \ oci://ghcr.io/seatgeek/charts/buildkit-operator \ --namespace buildkit-system \ --create-namespace ``` -------------------------------- ### Kind Cluster Management Commands Source: https://github.com/seatgeek/buildkit-operator/blob/main/CLAUDE.md Commands for managing a local Kind cluster for testing the operator. Includes cluster recreation, running the operator, and reverse proxy setup for debugging. ```bash make recreate make run make start_webhook_reverse_proxy kubectl --kubeconfig ./kind/kubeconfig [command] ``` -------------------------------- ### Helm Install Specific Version Source: https://github.com/seatgeek/buildkit-operator/blob/main/README.md Installs a specific version of the buildkit-operator using Helm. ```bash helm install buildkit-operator \ oci://ghcr.io/seatgeek/charts/buildkit-operator \ --version 1.0.0 \ --namespace buildkit-system \ --create-namespace ``` -------------------------------- ### Helm Install Latest from Main Branch Source: https://github.com/seatgeek/buildkit-operator/blob/main/README.md Installs the latest version from the main branch of the buildkit-operator using Helm. This is bleeding edge and uses development chart versions. ```bash # Note: Chart versions for main branch use format 0.0.0-main- # You can find the exact version in GitHub Actions or use --devel flag helm install buildkit-operator \ oci://ghcr.io/seatgeek/charts/buildkit-operator \ --namespace buildkit-system \ --create-namespace \ --set image.tag=main \ --devel ``` -------------------------------- ### Helm Test Pull Request Source: https://github.com/seatgeek/buildkit-operator/blob/main/README.md Installs a buildkit-operator version from a specific pull request using Helm. ```bash helm install buildkit-operator \ oci://ghcr.io/seatgeek/charts/buildkit-operator \ --namespace buildkit-system \ --create-namespace \ --set image.tag=pr-123 ``` -------------------------------- ### Testing Guidelines Source: https://github.com/seatgeek/buildkit-operator/blob/main/CLAUDE.md Guidelines for writing integration/UAT tests using Ginkgo/Gomega with envtest, and unit tests using table-based tests and testify. ```APIDOC Testing Guidelines: - Integration/UAT Tests: - Framework: Ginkgo/Gomega with envtest - Reference: https://raw.githubusercontent.com/reddit/achilles-sdk/refs/heads/main/docs/envtest.md - Unit Tests: - Approach: Table-based tests, t.Parallel() for concurrency - Assertions: testify ``` -------------------------------- ### Local Development - Recreate and Run Operator Source: https://github.com/seatgeek/buildkit-operator/blob/main/README.md Commands to set up and run the buildkit-operator locally using kind. ```bash make recreate make run ``` -------------------------------- ### Local Development - IDE Debugger Arguments Source: https://github.com/seatgeek/buildkit-operator/blob/main/README.md Program arguments to configure an IDE to debug the buildkit-operator. ```go "./cmd/operator" --kubeconfig ./kind/kubeconfig --kubecontext kind-buildkit ``` -------------------------------- ### Local Development - Debugging Operator Source: https://github.com/seatgeek/buildkit-operator/blob/main/README.md Commands to set up and run the buildkit-operator locally for debugging with an IDE. ```bash make recreate make start_webhook_reverse_proxy # Keep this running in the background until you're done debugging ``` -------------------------------- ### Build and Test Commands Source: https://github.com/seatgeek/buildkit-operator/blob/main/CLAUDE.md Commands for building, testing, generating code, and linting the operator. These are essential for the development workflow. ```bash make build make test make generate make lint make lint-fix ``` -------------------------------- ### Achilles SDK FSM Framework Source: https://github.com/seatgeek/buildkit-operator/blob/main/CLAUDE.md Documentation links for the Achilles SDK's Finite State Machine (FSM) framework, covering reconciliation, object application, finalizers, and metrics. ```APIDOC Achilles SDK FSM Framework: - State-based reconciliation - Built-in observability - Idempotent operations - Resource management via OutputSet Documentation: - FSM reconciler: https://raw.githubusercontent.com/reddit/achilles-sdk/refs/heads/main/docs/sdk-fsm-reconciler.md - Applying objects via OutputSets: https://raw.githubusercontent.com/reddit/achilles-sdk/refs/heads/main/docs/sdk-apply-objects.md - Writing finalizers: https://raw.githubusercontent.com/reddit/achilles-sdk/refs/heads/main/docs/sdk-finalizers.md - Built-in metrics and monitoring: https://raw.githubusercontent.com/reddit/achilles-sdk/refs/heads/main/docs/sdk-metrics.md ``` -------------------------------- ### Buildkit Kubernetes Resource Source: https://github.com/seatgeek/buildkit-operator/blob/main/README.md Creates a BuildKit instance by referencing a BuildkitTemplate. The operator deploys a BuildKit pod and sets the connection URL in the resource's status. ```yaml apiVersion: buildkit.seatgeek.io/v1alpha1 kind: Buildkit metadata: name: buildkit-arm64-instance namespace: some-ns spec: template: buildkit-arm64 ``` -------------------------------- ### Buildkit Controller Logic Source: https://github.com/seatgeek/buildkit-operator/blob/main/CLAUDE.md Core logic for the Buildkit controller, including FSM-based reconciliation, pod construction, status conditions, and resource utilities. ```go // internal/controllers/buildkit/reconciler.go // FSM-based reconciler for BuildKit pods. // internal/controllers/buildkit/builder.go // Pod construction logic. // internal/controllers/buildkit/conditions.go // Status condition constants. // internal/controllers/buildkit/resources/ // Resource manipulation utilities. ``` -------------------------------- ### BuildkitTemplate Controller Logic Source: https://github.com/seatgeek/buildkit-operator/blob/main/CLAUDE.md Core logic for the BuildkitTemplate controller, including FSM-based reconciliation, template construction, and status conditions. ```go // internal/controllers/buildkit_template/reconciler.go // FSM-based reconciler for BuildkitTemplate resources. // internal/controllers/buildkit_template/builder.go // Template construction logic. // internal/controllers/buildkit_template/conditions.go // Status condition constants. ``` -------------------------------- ### Interact with Cluster using kubectl Source: https://github.com/seatgeek/buildkit-operator/blob/main/README.md This snippet shows how to interact with the Buildkit Operator cluster using the kubectl command-line tool. It specifies the kubeconfig file to use for connecting to the cluster. ```bash kubectl --kubeconfig ./kind/kubeconfig [command] ``` -------------------------------- ### BuildkitTemplate Kubernetes Resource Source: https://github.com/seatgeek/buildkit-operator/blob/main/README.md Defines the configuration and scheduling for BuildKit instances. Includes settings for rootless mode, port, buildkitd configuration, resource requests/limits, and node scheduling. ```yaml apiVersion: buildkit.seatgeek.io/v1alpha1 kind: BuildkitTemplate metadata: name: buildkit-arm64 namespace: some-ns spec: # This is a simplified example; many other spec fields are available. rootless: true port: 1234 buildkitdToml: | [log] format = "json" [worker.oci] enabled = true max-parallelism = 3 cniPoolSize = 16 [worker.containerd] enabled = false resources: default: requests: cpu: 500m memory: 8Gi limits: memory: 8Gi maximum: cpu: 8 memory: 16Gi scheduling: nodeSelector: kubernetes.io/arch: arm64 kubernetes.io/os: linux tolerations: - key: dedicated operator: Equal value: buildkit effect: NoSchedule ``` -------------------------------- ### Admission Webhook Handlers Source: https://github.com/seatgeek/buildkit-operator/blob/main/CLAUDE.md Admission webhook handlers for validating and defaulting Buildkit and BuildkitTemplate resources. ```go // internal/webhooks/buildkit.go // Validation webhook for Buildkit resources. // internal/webhooks/buildkit_template.go // Validation and defaulting webhook for BuildkitTemplate resources. ``` -------------------------------- ### Interact with Cluster using k9s Source: https://github.com/seatgeek/buildkit-operator/blob/main/README.md This snippet demonstrates how to interact with the Buildkit Operator cluster using the k9s terminal-based UI. It specifies the kubeconfig file and enables write mode. ```bash k9s --kubeconfig ./kind/kubeconfig --write ``` -------------------------------- ### Helm Uninstall Source: https://github.com/seatgeek/buildkit-operator/blob/main/README.md Uninstalls the buildkit-operator from the specified namespace using Helm. ```bash helm uninstall buildkit-operator --namespace buildkit-system ``` -------------------------------- ### BuildkitTemplate CRD Types Source: https://github.com/seatgeek/buildkit-operator/blob/main/CLAUDE.md Go types for the BuildkitTemplate Custom Resource Definition (CRD). Defines the pod template and configuration for BuildKit instances. ```go // api/v1alpha1/buildkit_template_types.go // Defines the spec for BuildkitTemplate resources. ``` -------------------------------- ### Buildkit CRD Types Source: https://github.com/seatgeek/buildkit-operator/blob/main/CLAUDE.md Go types for the Buildkit Custom Resource Definition (CRD). Defines the spec and status of a BuildKit instance. ```go // api/v1alpha1/buildkit_types.go // Defines the spec and status for Buildkit resources. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.