### Full Production Install of Redpanda using Helm Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Use this snippet to perform a full production installation of Redpanda with specified configurations for image, replicas, resources, storage, authentication, TLS, external access, monitoring, console, and rack awareness. Ensure the `redpanda-values.yaml` file is correctly populated. ```yaml image: tag: v26.1.1 statefulset: replicas: 3 resources: cpu: cores: 4 overprovisioned: false memory: container: max: "8Gi" storage: persistentVolume: enabled: true size: 100Gi storageClass: "gp3" auth: sasl: enabled: true mechanism: SCRAM-SHA-512 secretRef: redpanda-users users: - name: admin password: change-me mechanism: SCRAM-SHA-512 tls: enabled: true certs: default: caEnabled: true external: enabled: true type: LoadBalancer domain: redpanda.example.com monitoring: enabled: true scrapeInterval: 30s console: enabled: true rackAwareness: enabled: true nodeAnnotation: topology.kubernetes.io/zone auditLogging: enabled: true enabledEventTypes: - admin - authenticate - management ``` ```bash helm upgrade --install redpanda redpanda/redpanda \ --namespace redpanda \ --create-namespace \ --values redpanda-values.yaml \ --wait --timeout 15m ``` -------------------------------- ### Basic Redpanda Operator Install using Helm Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Installs the Redpanda Operator with default settings. Ensure the Redpanda Helm repository is added and updated before running. ```bash helm repo add redpanda https://charts.redpanda.com helm repo update # Basic operator install helm install redpanda-operator redpanda/operator \ --namespace redpanda-system \ --create-namespace \ --set image.tag=v26.1.1 ``` -------------------------------- ### StartupProbe Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc Configures the startup probe to determine when the Redpanda application has started successfully. ```APIDOC ## StartupProbe ### Description StartupProbe configures the startup probe to determine when the Redpanda application within the Pod has started successfully. ``` -------------------------------- ### PostInstallJob Configuration Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc Defines configurations for the post-install job that runs after the Helm chart is installed. This includes resource requirements, annotations, labels, affinity, security context, and pod templates. ```APIDOC ## PostInstallJob ### Description PostInstallJob configures configurations for the post-install job that run after installation of the Helm chart. ### Fields - **resources** (ResourceRequirements) - Sets resource requirements (CPU, memory) for the job to ensure proper allocation and limit resource usage. - **annotations** (object (keys:string, values:string)) - Adds annotations to the job to provide additional information or metadata that can be used by other tools or libraries. - **enabled** (boolean) - Specifies whether the job is deployed. - **labels** (object (keys:string, values:string)) - Applies labels to the job to facilitate identification and selection based on custom criteria. - **affinity** (Affinity) - Affinity constraints for scheduling Pods. For details, see the Kubernetes' documentation. - **securityContext** (SecurityContext) - SecurityContext is deprecated. Prefer PodTemplate.Spec.SecurityContext or PodTemplate.Spec.Containers[*].SecurityContext. - **podTemplate** (PodTemplate) - PodTemplate is a subset of Kubernetes' PodTemplate that will be merged into this Job's PodTemplate. ``` -------------------------------- ### InitContainerImage Configuration Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc Configures the image for init containers used for initial setup tasks. ```APIDOC ## InitContainerImage ### Description InitContainerImage configures the init container image used to perform initial setup tasks before the main containers start. ### Fields - **repository** (string) - - **tag** (string) - ``` -------------------------------- ### Run the main operator controller manager Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Starts the main operator controller manager with specified configurations for namespace, enabled controllers, webhook, metrics, and health probes. ```bash redpanda-operator run \ --namespace redpanda \ --enable-redpanda-controllers \ --webhook-enabled=true \ --metrics-bind-address=:8080 \ --health-probe-bind-address=:8081 \ --leader-elect ``` -------------------------------- ### Install Redpanda Operator and Apply Redpanda CRD Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Install the Redpanda operator using Helm and then apply the Redpanda cluster CRD definition. ```bash # Install the operator chart first helm repo add redpanda https://charts.redpanda.com helm install redpanda-operator redpanda/operator --namespace redpanda-system --create-namespace # Apply the Redpanda CRD resource kubectl apply -f redpanda-cluster.yaml # Watch cluster status kubectl get redpanda -n redpanda -w # NAME READY STATUS LICENSE # redpanda True Redpanda reconciliation succeeded Community # Check conditions kubectl get redpanda redpanda -n redpanda -o jsonpath='{.status.conditions}' | jq . ``` -------------------------------- ### Deploy Redpanda using Helm Chart Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Commands to add the Redpanda Helm repository, update it, and install the Redpanda chart with minimal configuration, including setting replica count, CPU, memory, and storage. ```bash # Add the Redpanda Helm repository helm repo add redpanda https://charts.redpanda.com helm repo update # Install with minimal configuration helm install redpanda redpanda/redpanda \ --namespace redpanda \ --create-namespace \ --set statefulset.replicas=3 \ --set resources.cpu.cores=2 \ --set resources.memory.container.max="4Gi" \ --set storage.persistentVolume.size="20Gi" ``` -------------------------------- ### InitContainers Configuration Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc Configures various init containers for setup tasks, including configurators, ownership settings, and filesystem validation. ```APIDOC ## InitContainers ### Description InitContainers configures the init container used to perform initial setup tasks before the main containers start. ### Fields - **configurator** (Configurator) - - **extraInitContainers** (string) - - **setDataDirOwnership** (SetDataDirOwnership) - Defines the settings related to ownership of the Redpanda data directory in environments where root access is restricted. + - **setTieredStorageCacheDirOwnership** (SetTieredStorageCacheDirOwnership) - Defines the settings related to ownership of the Tiered Storage cache in environments where root access is restricted. + - **fsValidator** (FsValidator) - Defines the setting for init container that not allow to start Redpanda until filesystem matches + - **tuning** (Tuning) - Defines settings for the autotuner tool in Redpanda. The autotuner identifies the hardware configuration in the container and optimizes the Linux kernel to give you the best performance. + ``` -------------------------------- ### Redpanda Console Install using Helm Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Installs Redpanda Console, a web UI for managing Redpanda resources. This configuration points to an existing Redpanda cluster and enables ingress. Ensure `console-values.yaml` is tailored to your cluster's details. ```yaml image: repository: docker.redpanda.com/redpandadata/console tag: v3.7.0 console: config: kafka: brokers: - redpanda-0.redpanda.redpanda.svc.cluster.local:9093 tls: enabled: true caFilepath: /etc/tls/certs/ca.crt sasl: enabled: true mechanism: SCRAM-SHA-256 username: admin password: secretRef: name: redpanda-users key: admin redpanda: adminApi: enabled: true urls: - http://redpanda-0.redpanda.redpanda.svc.cluster.local:9644 schemaRegistry: enabled: true urls: - https://redpanda-0.redpanda.redpanda.svc.cluster.local:8081 service: type: ClusterIP port: 8080 ingress: enabled: true annotations: kubernetes.io/ingress.class: nginx hosts: - host: console.example.com paths: - path: / pathType: Prefix ``` ```bash helm upgrade --install console redpanda/console \ --namespace redpanda \ --values console-values.yaml \ --wait ``` -------------------------------- ### ClusterSource with clusterRef configuration Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Example of configuring `ClusterSource` using `clusterRef` for automatic endpoint discovery via the `Redpanda` CR. This is the recommended approach for in-cluster configurations. ```yaml # ClusterSource with clusterRef (recommended for in-cluster) cluster: clusterRef: name: redpanda # name of the Redpanda CR # kind: Redpanda # optional override, defaults to "Redpanda" # group: cluster.redpanda.com # optional override ``` -------------------------------- ### Kafka Connectors Install using Helm Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Deploys the Redpanda Connectors (Kafka Connect) service. This configuration specifies broker and schema registry URLs, SASL authentication, replication factor, and resource limits. Adjust `connectors-values.yaml` for your environment. ```yaml image: repository: docker.redpanda.com/redpandadata/connectors tag: latest connectors: brokers: "redpanda-0.redpanda.redpanda.svc.cluster.local:9093" schemaRegistryURL: "http://redpanda-0.redpanda.redpanda.svc.cluster.local:8081" bootstrapServers: "redpanda-0.redpanda.redpanda.svc.cluster.local:9093" # SASL authentication auth: sasl: enabled: true mechanism: "SCRAM-SHA-256" userName: admin passwordSecretRef: name: redpanda-users key: admin storage: replicationFactor: 3 deployment: replicas: 2 resources: requests: cpu: "1" memory: "1Gi" limits: cpu: "2" memory: "2Gi" monitoring: enabled: true scrapeInterval: 30s ``` ```bash helm upgrade --install connectors redpanda/connectors \ --namespace redpanda \ --values connectors-values.yaml \ --wait ``` -------------------------------- ### Build and Push Operator Container Image Source: https://github.com/redpanda-data/redpanda-operator/blob/main/CONTRIBUTING.md Build a development container image using 'task build:image' and then tag and push it to a public container registry. This is an alternative setup for faster developer lifecycle with a Kubernetes cluster. ```bash docker tag localhost/redpanda-operator:dev YOUR_PUBLIC_CONTAINER_REGISTRY/YOUR_CONTAINER_REPO:NEW_UNIQUE_TAG docker push YOUR_PUBLIC_CONTAINER_REGISTRY/YOUR_CONTAINER_REPO:NEW_UNIQUE_TAG ``` -------------------------------- ### Build Harpoon Test Suite with Flags Source: https://github.com/redpanda-data/redpanda-operator/blob/main/harpoon/README.md Demonstrates building a Harpoon test suite using `SuiteBuilderFromFlags`. It shows how to register providers, set a default provider, configure Helm charts, specify CRD directories, register custom feature hooks, and register tag processors. ```go suite, err = framework.SuiteBuilderFromFlags(). RegisterProvider("eks", framework.NoopProvider). RegisterProvider("gke", framework.NoopProvider). RegisterProvider("aks", framework.NoopProvider). RegisterProvider("k3d", framework.NoopProvider). WithDefaultProvider("k3d"). WithHelmChart("http://some.host.local", "some", "dependency", helm.InstallOptions{ Name: "dependency", Namespace: "dependency", Version: "v1.1.1", CreateNamespace: true, }). WithCRDDirectory("path/to/crds"). OnFeature(func(ctx context.Context, t framework.TestingT) { t.Log("Installing some helm chart") t.InstallHelmChart(ctx, "http://some.host.local", "some", "chart", helm.InstallOptions{ Name: "chart", Namespace: t.IsolateNamespace(ctx), Values: map[string]any{}, }) t.Log("Successfully installed some helm chart") }). RegisterTag("mytag", 1, MyTagProcessor). Build() ``` -------------------------------- ### Mint Versions with Changie Source: https://github.com/redpanda-data/redpanda-operator/blob/main/CLAUDE.md Use this command to generate version entries for projects. Add `-k` for pre-releases to keep unreleased entries. ```bash nix develop -c changie batch -j ``` -------------------------------- ### Run the configurator init container Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Generates the broker redpanda.yaml configuration using the configurator init container. It uses the hostname and namespace for context. ```bash redpanda-operator configurator \ --node-name $(hostname) \ --namespace redpanda \ --subdomain redpanda.redpanda.svc.cluster.local ``` -------------------------------- ### Install/upgrade CRDs Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Installs or upgrades Custom Resource Definitions (CRDs) for the Redpanda operator. ```bash redpanda-operator crd install ``` -------------------------------- ### Enter Development Shell with Nix Source: https://github.com/redpanda-data/redpanda-operator/blob/main/CONTRIBUTING.md Use 'nix develop' to enter a development shell with all necessary tools. Optionally specify a shell like 'fish' or 'zsh'. ```bash nix develop # Enter a development shell. ``` ```bash nix develop -c fish # Enter a development shell using fish ``` ```bash nix develop -c zsh # Enter a development shell using zsh ``` -------------------------------- ### Bootstrap a new cluster (init container) Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Initializes a new Redpanda cluster using the bootstrap command, specifying the namespace and service account. ```bash redpanda-operator bootstrap \ --namespace redpanda \ --service-account redpanda ``` -------------------------------- ### UsageStats Configuration Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc Configures the reporting of usage statistics for Redpanda Data to learn how the software is used and guide future improvements. ```APIDOC ## UsageStats ### Description UsageStats configures the reporting of usage statistics. Redpanda Data uses these metrics to learn how the software is used, which can guide future improvements. ``` -------------------------------- ### Configure Nix Experimental Features Source: https://github.com/redpanda-data/redpanda-operator/blob/main/CONTRIBUTING.md Enable 'nix-command' and 'flakes' experimental features in nix.conf to simplify Nix commands. This avoids repeatedly typing extra flags. ```bash echo 'experimental-features = nix-command flakes' >> /etc/nix/nix.conf ``` -------------------------------- ### Run GolangCI-Lint Source: https://github.com/redpanda-data/redpanda-operator/blob/main/CLAUDE.md Runs the golangci-lint tool to check code quality and style. Assumes the v2 format and requires the nix devshell. ```bash nix develop -c task lint ``` -------------------------------- ### Build Alias with Custom Command Source: https://github.com/redpanda-data/redpanda-operator/blob/main/alias/README.md Build the Alias program using Go, setting the 'AliasTo' variable via ldflags to specify the command to be aliased. The output binary is named 'dog'. ```sh go build -ldflags "-X main.AliasTo=cat" -o ./dog ./main.go ``` -------------------------------- ### Production Redpanda Operator Install with Helm Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Deploys the Redpanda Operator with production-ready configurations including metrics, webhooks, and optional multicluster support. Customize `operator-values.yaml` for specific needs. ```yaml image: repository: docker.redpanda.com/redpandadata/redpanda-operator tag: v26.1.1 # Enable the operator's built-in Helm controller (useFlux: false mode) additionalCmdFlags: - "--enable-redpanda-controllers" - "--webhook-enabled=true" rabc: create: true serviceAccount: create: true metrics: enabled: true scrapeInterval: 30s webhook: enabled: true multicluster: enabled: false ``` ```bash helm upgrade --install redpanda-operator redpanda/operator \ --namespace redpanda-system \ --create-namespace \ --values operator-values.yaml \ --wait ``` -------------------------------- ### Configure Liveness and Readiness Probes Source: https://github.com/redpanda-data/redpanda-operator/blob/main/charts/console/chart/README.md Customize settings for liveness and readiness probes. Refer to Kubernetes documentation for detailed probe configuration. ```json {"failureThreshold":3,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1} ``` -------------------------------- ### Check Redpanda Operator Rollout Status Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/chart/templates/NOTES.txt Use this command to monitor the deployment status of the Redpanda Operator pods after installation. The `-w` flag enables watch mode, providing real-time updates. ```bash kubectl -n {{ .Release.Namespace }} rollout status -w deployment/{{ template "redpanda-operator.fullname" . }} ``` -------------------------------- ### Invoking Transpiled Go Functions in Helm Source: https://github.com/redpanda-data/redpanda-operator/blob/main/gotohelm/README.md Call transpiled Go functions from Helm templates using the `include` builtin. The output is processed via `fromJson` and `get` to extract the return value. ```helm ((include NAMESPACE.NAME (dict "a" (list ARGS...))) | fromJson | get "r") ``` -------------------------------- ### Build Helm context and unwrap values in Go Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Demonstrates building a Helm `.` context (`helmette.Dot`) for testing chart functions and unwrapping Helm values into a strongly-typed Go struct using `helmette.Unwrap`. ```go package main import ( "fmt" "github.com/redpanda-data/redpanda-operator/gotohelm/helmette" corev1 "k8s.io/api/core/v1" ) func main() { // Build a Dot (the helm `.` context) for testing chart functions dot := &helmette.Dot{ Release: helmette.Release{ Name: "redpanda", Namespace: "redpanda", Service: "redpanda", IsInstall: true, }, Chart: helmette.Chart{ Name: "redpanda", Version: "26.1.1", AppVersion: "v26.1.1", }, Capabilities: helmette.Capabilities{ KubeVersion: func() helmette.KubeVersion { kv, _ := helmette.ParseKubeVersion("v1.30.2") return *kv }(), }, } // Unwrap Helm values into a strongly-typed Go struct type MyValues struct { Replicas int `json:"replicas"` Image string `json:"image"` } values := helmette.Values{"replicas": 3, "image": "redpanda:v26.1.1"} typed := helmette.Unwrap[MyValues](values) fmt.Printf("Replicas: %d, Image: %s\n", typed.Replicas, typed.Image) // Output: Replicas: 3, Image: redpanda:v26.1.1 // SortedMap: deterministic map iteration (important for YAML generation) m := map[string]string{"b": "2", "a": "1", "c": "3"} for k, v := range helmette.SortedMap(m) { fmt.Printf("%s=%s\n", k, v) } // Output: a=1, b=2, c=3 // AsIntegral: helm-safe numeric type conversion var raw any = float64(3) if n, ok := helmette.AsIntegral[int](raw); ok { fmt.Printf("replicas: %d\n", n) // replicas: 3 } // Tpl: render a Go template string the way helm's `tpl` function works result := helmette.Tpl(dot, `{{ .Release.Name }}-headless`, dot) fmt.Println(result) // redpanda-headless // Kubernetes version constraint checking kv, _ := helmette.ParseKubeVersion("v1.32.0-gke.123") fmt.Println(kv.Major, kv.Minor) // 1 32 fmt.Println(kv.String()) // v1.32.0 (normalized, strips cloud suffix) // Lookup a Kubernetes object from within a chart function (returns nil when no kubeconfig) secret, found := helmette.Lookup[corev1.Secret](dot, "redpanda", "my-tls-secret") if !found { fmt.Println("secret not found (expected during `helm template`)") } _ = secret } ``` -------------------------------- ### Build All Projects Source: https://github.com/redpanda-data/redpanda-operator/blob/main/CLAUDE.md Builds all specified projects including operator, console, and redpanda charts. This command is intended for use within the nix devshell. ```bash nix develop -c bash -c 'go build ./operator/... && go build ./charts/console/... && go build ./charts/redpanda/...' ``` -------------------------------- ### ReadinessProbe Configuration Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc ReadinessProbe configures readiness probes to determine when a Pod is ready to handle traffic. It includes settings for failure threshold, initial delay, period, timeout, and success threshold. ```APIDOC ## ReadinessProbe ReadinessProbe configures readiness probes to determine when a Pod is ready to handle traffic. ### Fields * **`failureThreshold`** (integer) - Defines the threshold for how many times the probe can fail before the Pod is marked Unready. * **`initialDelaySeconds`** (integer) - Sets the initial delay before the readiness probe is initiated, in seconds. * **`periodSeconds`** (integer) - Configures the period, in seconds, between each readiness check. * **`timeoutSeconds`** (integer) - Timeout for the readiness probe. * **`successThreshold`** (integer) - Success threshold for the readiness probe. ``` -------------------------------- ### Run All Linters Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Executes all configured linters for the project, including golangci-lint, helm lint, and actionlint. This command helps maintain code quality and consistency across the repository. ```bash # Run all linters (golangci-lint v2, helm lint --strict, actionlint) nix develop -c task lint ``` -------------------------------- ### Create New Changelog Entry Source: https://github.com/redpanda-data/redpanda-operator/blob/main/CONTRIBUTING.md Use 'changie new' to create a new changelog entry for user-facing changes. This command initiates the process for documenting changes. ```bash changie new ``` -------------------------------- ### Build Operator Project Source: https://github.com/redpanda-data/redpanda-operator/blob/main/CLAUDE.md Builds the operator project components. This command should be executed within the nix devshell. ```bash nix develop -c go build ./operator/... ``` -------------------------------- ### Run Unit Tests Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Executes unit tests for the project. This requires the Nix dev shell to be active, which provides the necessary `envtest` environment. ```bash # Run unit tests (requires envtest via nix devshell) nix develop -c task test:unit ``` -------------------------------- ### Check broker readiness Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Checks the readiness status of a Redpanda broker pod within a specified namespace. ```bash redpanda-operator ready \ --namespace redpanda \ --pod-name redpanda-0 ``` -------------------------------- ### Logging Configuration Source: https://github.com/redpanda-data/redpanda-operator/blob/main/charts/redpanda/chart/README.md Configure logging settings, including the log level and usage statistics reporting. ```json {"logLevel":"info","usageStats":{"enabled":true}} ``` -------------------------------- ### Apply and Inspect ShadowLink Resources Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Commands to apply a ShadowLink definition and check its synchronization status and state. ```bash kubectl apply -f shadowlink.yaml kubectl get shadowlinks -n redpanda # NAME SYNCED # dr-link True kubectl get shadowlink dr-link -n redpanda -o jsonpath='{.status.state}' # active ``` -------------------------------- ### ConsoleCreateObj Configuration Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc Configuration options for creating Kubernetes objects related to Redpanda Console, such as ConfigMaps, Secrets, and Deployments. ```APIDOC ## ConsoleCreateObj Configuration ### Description Controls the creation of Kubernetes objects for Redpanda Console. ### Fields - **`create`** (boolean) - Indicates whether the corresponding Kubernetes object (ConfigMap, Secret, or Deployment) should be created. ``` -------------------------------- ### LivenessProbe Configuration Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc Configures liveness probes for Redpanda Pods to ensure their health and enable automatic restarts if they become unresponsive. ```APIDOC ## LivenessProbe LivenessProbe configures liveness probes to monitor the health of the Pods and restart them if necessary. ### Fields - **failureThreshold** (integer) - Sets the number of consecutive failures required to consider a Pod as not live. - **initialDelaySeconds** (integer) - Specifies the time in seconds to wait before the first probe is initiated. - **periodSeconds** (integer) - Determines the frequency in seconds of performing the probe. - **timeoutSeconds** (integer) - Specifies the time in seconds after which the probe times out. - **successThreshold** (integer) - Specifies the minimum consecutive successes for the probe to be considered successful after having failed. ``` -------------------------------- ### Godog Step Function Signatures with TestingT Source: https://github.com/redpanda-data/redpanda-operator/blob/main/harpoon/README.md Demonstrates the extended step definition formats in Harpoon, allowing for an additional TestingT argument alongside context.Context. ```golang func someStep1noError(ctx context.Context, t TestingT, ...) func someStep1Error(ctx context.Context, t TestingT, ...) error func someStep2noError(t TestingT, ...) func someStep2Error(t TestingT, ...) error func someStep3noError(ctx context.Context, ...) func someStep3Error(ctx context.Context, ...) error func someStep4noError(...) func someStep4Error(...) error ``` -------------------------------- ### Run Go Tests with Nix Devshell Source: https://github.com/redpanda-data/redpanda-operator/blob/main/CLAUDE.md Executes Go tests within a Nix devshell environment, which automatically sets up necessary configurations like the protobuf registration conflict ignore. ```bash nix develop -c go test ./operator/... ``` -------------------------------- ### HTTP Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc HTTP configures settings for the HTTP Proxy listeners. ```APIDOC ## HTTP ### Description HTTP configures settings for the HTTP Proxy listeners. ### Fields #### `enabled` (boolean) - Description: Specifies whether this Listener is enabled. #### `authenticationMethod` (string) - Description: Specifies the authentication method for this listener. For example, 'mtls_identity', `sasl` or `http_basic`. #### `appProtocol` (string) #### `port` (integer) - Description: Specifies the container port number for this listener. #### `tls` (ListenerTLS) - Description: Configures TLS settings for the internal listener. #### `prefixTemplate` (string) - Description: Specifies the template used for generating the advertised addresses of Services. This field accepts a string template that dynamically constructs Service addresses based on various parameters such as Service name and port number. For historical backwards compatibility, this field is present on both internal and external listeners. However, it is ignored when specified on internal listeners. #### `external` (object (keys:string, values:ExternalListener)) - Description: Defines settings for the external listeners. #### `kafkaEndpoint` (string) - Description: Configures the listener to use for HTTP connections. For example `default` for the internal listener. deprecated and not respected. ``` -------------------------------- ### Nix Dev Shell Entry Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Enters the Nix development shell, which sets up all necessary environment variables and tools for reproducible builds and development within the project. ```bash # Enter the Nix dev shell (sets KUBEBUILDER_ASSETS, GOLANG_PROTOBUF_REGISTRATION_CONFLICT, etc.) nix develop ``` -------------------------------- ### CPU Resources Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc CPU configures CPU resources for containers. ```APIDOC ## CPU Resources ### Description CPU configures CPU resources for containers. See https://docs.redpanda.com/current/manage/kubernetes/manage-resources/. ### Fields - **`cpu`** (string) - CPU resource limit or request. ``` -------------------------------- ### Tuning Configuration Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc Configures settings for the autotuner tool in Redpanda, optimizing Linux kernel settings for performance based on hardware configuration. ```APIDOC ## Tuning ### Description Tuning configures settings for the autotuner tool in Redpanda. The autotuner identifies the hardware configuration in the container and optimizes the Linux kernel to give you the best performance. ### Fields - **`extraVolumeMounts`** (string) - Configures additional volume mounts for the Pod. - **`resources`** (ResourceRequirements) - Sets resource requirements such as CPU and memory limits. - **`ballast_file_path`** (string) - Specifies the file path for ballast file. A ballast file is an empty file that takes up disk space. If Redpanda runs out of disk space and becomes unavailable, you can delete the ballast file as a last resort. This clears up some space and gives you time to delete topics or records and change your retention properties. - **`ballast_file_size`** (string) - Defines the size of the ballast file. - **`tune_aio_events`** (boolean) - Specifies whether to increase the number of allowed asynchronous IO events. - **`tune_ballast_file`** (boolean) - Specifies whether to create the ballast file. - **`tune_clocksource`** (boolean) - Specifies whether to synchronize NTP. - **`well_known_io`** (string) - Specifies the vendor, VM type, and storage device type that Redpanda runs on, in the format ::. This hints to Redpanda which configuration values it should use for the Redpanda IO scheduler. ``` -------------------------------- ### Enter Nix Devshell Source: https://github.com/redpanda-data/redpanda-operator/blob/main/CLAUDE.md Enters the nix development shell, recommended for interactive work to ensure correct tool versions and environment variables. ```bash nix develop ``` -------------------------------- ### Redpanda Console Configuration Options Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc This section details the various configuration parameters available for customizing the Redpanda Console deployment. ```APIDOC ## Redpanda Console Configuration This document outlines the configurable options for the Redpanda Console deployment within the Redpanda Operator. ### Configuration Parameters - **`annotations`** (`RawExtension`): Adds custom annotations to the Pods that run Redpanda Console. - **`podAnnotations`** (`RawExtension`): Adds custom annotations to the Pods that run Redpanda Console. - **`podLabels`** (`RawExtension`): Adds custom labels to the Pods that run Redpanda Console. - **`podSecurityContext`** (`RawExtension`): Configures the security context for the Pods that run Redpanda Console. - **`securityContext`** (`RawExtension`): Sets the security context for the Pods that run Redpanda Console. - **`service`** (`RawExtension`): Configures the Kubernetes Service for Redpanda Console. - **`ingress`** (`RawExtension`): Configures the Kubernetes Ingress resource for Redpanda Console. - **`resources`** (`RawExtension`): Configures resource requests and limits for the Pods that run Redpanda Console. - **`autoscaling`** (`RawExtension`): Configures Horizontal Pod Autoscaling (HPA) for Redpanda Console. - **`nodeSelector`** (`RawExtension`): Specifies Node labels for Pod assignment. - **`tolerations`** (array): Specifies tolerations for scheduling Pods onto Nodes with taints. - **`affinity`** (`RawExtension`): Defines affinity rules for Pod assignment. - **`topologySpreadConstraints`** (`RawExtension`): Specifies topology spread constraints for Pod placement. - **`extraEnv`** (array): Adds extra environment variables to the Pods that run Redpanda Console. - **`extraEnvFrom`** (array): Allows you to add extra environment variables from external resources to the Pods that run Redpanda Console. - **`extraVolumes`** (array): Adds extra volumes to the Pods that run Redpanda Console. - **`extraVolumeMounts`** (array): Mounts additional volumes inside the containers that run Redpanda Console. - **`extraContainers`** (array): Adds extra containers to the Pods that run Redpanda Console. - **`initContainers`** (`RawExtension`): Specifies init containers for the Pods that run Redpanda Console. - **`secretMounts`** (array): Mounts additional Secret resources inside the containers that run Redpanda Console. - **`configmap`** (`ConsoleCreateObj`): Deprecated: this field exists for storage backwards compatibility and is never used. Prefer ConfigMap (configmap). - **`configMap`** (`ConsoleCreateObj`): Specifies whether a ConfigMap should be created for Redpanda Console. - **`secret`** (`RawExtension`): Specifies whether a Secret should be created for Redpanda Console. ``` -------------------------------- ### Budget Configuration Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc Budget configures the management of disruptions affecting the Pods in the StatefulSet. ```APIDOC ## Budget Configuration ### Description Budget configures the management of disruptions affecting the Pods in the StatefulSet. ### Fields - **`maxUnavailable`** (integer) - Defines the maximum number of Pods that can be unavailable during a voluntary disruption. ``` -------------------------------- ### Run Chart Template Tests Source: https://github.com/redpanda-data/redpanda-operator/blob/main/CLAUDE.md Builds Redpanda chart dependencies and runs template tests. This command requires the nix devshell environment. ```bash nix develop -c bash -c 'helm dep build charts/redpanda/chart && go test ./charts/redpanda/... -run TestTemplate' ``` -------------------------------- ### LivenessProbe Configuration Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc Configuration for liveness probes used to monitor the health of Redpanda Pods. ```APIDOC ## LivenessProbe ### Description Defines liveness probes to monitor the health of the Pods and restart them if necessary. ### Fields * **`failureThreshold`** (integer) - Determines the failure threshold to mark the application in the Pod as not started. * **`initialDelaySeconds`** (integer) - Specifies the delay in seconds before the startup probe begins. * **`periodSeconds`** (integer) - Sets the period in seconds for conducting subsequent probes. * **`timeoutSeconds`** (integer) - Timeout for the probe. * **`successThreshold`** (integer) - Minimum consecutive successes for the probe to be considered successful after having failed. ``` -------------------------------- ### Run Integration Tests Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Executes integration tests for the project. This requires a k3d cluster to be running, as these tests typically involve deploying and interacting with Redpanda in a Kubernetes-like environment. ```bash # Run integration tests (requires a k3d cluster) nix develop -c task test:integration ``` -------------------------------- ### Storage Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc Storage configures storage-related settings in the Helm values. ```APIDOC ## Storage ### Description Storage configures storage-related settings in the Helm values. See https://docs.redpanda.com/current/manage/kubernetes/storage/. ### Fields - **hostPath** (string) - Specifies the absolute path on the worker node to store the Redpanda data directory. If unspecified, then an `emptyDir` volume is used. If specified but `persistentVolume.enabled` is true, `storage.hostPath` has no effect. - **persistentVolume** (PersistentVolume) - Configures a PersistentVolumeClaim (PVC) template to create for each Pod. This PVC is used to store the Redpanda data directory. - **tiered** (Tiered) - Configures storage for the Tiered Storage cache. ``` -------------------------------- ### ConnectorsCreateObj Configuration Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc Configuration options for creating Kubernetes resources for Redpanda Connectors. ```APIDOC ## ConnectorsCreateObj Configuration ### Description Configures Kubernetes resources for Redpanda Connectors. ### Fields - **`create`** (boolean) - Specifies whether to create the resource. - **`enabled`** (boolean) - Deprecated: this field exists for storage backwards compatibility and is never used. Prefer Create. ``` -------------------------------- ### Run All E2E Tests Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/tests/README.md Execute all available E2E tests for the Redpanda Operator. This command initiates the KUTTL testing framework against a Kind cluster. ```bash make e2e-tests ``` -------------------------------- ### StaticConfigurationSource Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc Configures connections to a Redpanda cluster via hard-coded connection strings and manually configured TLS and authentication parameters. ```APIDOC ## StaticConfigurationSource ### Description StaticConfigurationSource configures connections to a Redpanda cluster via hard-coded connection strings and manually configured TLS and authentication parameters. ### Fields - **kafka** (KafkaAPISpec) - Kafka is the configuration information for communicating with the Kafka API of a Redpanda cluster where the object should be created. - **admin** (AdminAPISpec) - AdminAPISpec is the configuration information for communicating with the Admin API of a Redpanda cluster where the object should be created. - **schemaRegistry** (SchemaRegistrySpec) - SchemaRegistry is the configuration information for communicating with the Schema Registry API of a Redpanda cluster where the object should be created. ``` -------------------------------- ### Changie: Create New Changelog Entry Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Creates a new unreleased changelog entry for a specific project. Use this to document fixes, features, or other changes before a release. ```bash # Enter the Nix dev shell (required for all commands) nix develop # Add an unreleased changelog entry for a fix in the operator changie new --project operator --kind Fixed --body "Fixed reconciliation loop for decommissioned nodes" ``` -------------------------------- ### DeploymentConfig Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc Configuration for deployment, including command and extra arguments. ```APIDOC ## DeploymentConfig ### Fields - **command** (string array) - **extraArgs** (string array) ``` -------------------------------- ### Apply and Inspect NodePool Resources Source: https://context7.com/redpanda-data/redpanda-operator/llms.txt Commands to apply a NodePool definition to your Kubernetes cluster and then inspect its status and replica counts. ```bash kubectl apply -f nodepool.yaml kubectl get nodepools -n redpanda # NAME BOUND DEPLOYED # high-memory True True # Check replica counts kubectl get nodepool high-memory -n redpanda -o jsonpath='{.status}' | jq '{replicas, desiredReplicas, readyReplicas}' ``` -------------------------------- ### RedpandaConsole Configuration Source: https://github.com/redpanda-data/redpanda-operator/blob/main/operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc Configuration options for deploying and managing the Redpanda Console subchart. ```APIDOC ## RedpandaConsole ### Description RedpandaConsole is the union of console.PartialValues (earlier or equal to v0.7.31 Console version) and consolev3.PartialValues (after v0.7.31 Console version). Use these settings to configure the subchart. For more details on each setting, see the Helm values for the Redpanda Console chart: https://artifacthub.io/packages/helm/redpanda-data/console?modal=values ### Appears In - RedpandaClusterSpec ### Fields - **`enabled`** (boolean) - Specifies whether the Redpanda Console subchart should be deployed. - **`replicaCount`** (integer) - Sets the number of replicas for the Redpanda Console Deployment resource. - **`nameOverride`** (string) - Specifies a custom name for the Redpanda Console resources, overriding the default naming convention. - **`fullnameOverride`** (string) - Specifies a full custom name, which overrides the entire naming convention including release name and chart name. - **`commonLabels`** (object (keys:string, values:string)) - **`priorityClassName`** (string) - Specifies the priority class name for the Pods that run Redpanda Console. - **`image`** (RawExtension) - Defines the container image for the Redpanda Console, including the repository, name, and tag. - **`imagePullSecrets`** (RawExtension array) - Defines Secrets used to pull the container images from a private registry. - **`serviceAccount`** (RawExtension) - Configures the ServiceAccount used by the Pods that run Redpanda Console. ``` -------------------------------- ### Configure Redpanda Console Docker Image Source: https://github.com/redpanda-data/redpanda-operator/blob/main/charts/console/chart/README.md Set the Docker image pull policy, registry, repository, and tag for the Redpanda Console. ```json {"pullPolicy":"IfNotPresent","registry":"docker.redpanda.com","repository":"redpandadata/console","tag":""} ```