|
| 1 | +@cluster:basic |
| 2 | +Feature: Console CRDs |
| 3 | + Background: Cluster available |
| 4 | + Given cluster "basic" is available |
| 5 | + |
| 6 | + Scenario: Using clusterRef |
| 7 | + When I apply Kubernetes manifest: |
| 8 | + ```yaml |
| 9 | + --- |
| 10 | + apiVersion: cluster.redpanda.com/v1alpha2 |
| 11 | + kind: Console |
| 12 | + metadata: |
| 13 | + name: console |
| 14 | + spec: |
| 15 | + cluster: |
| 16 | + clusterRef: |
| 17 | + name: basic |
| 18 | + ``` |
| 19 | + Then Console "console" will be healthy |
| 20 | + # These steps demonstrate that console is correctly connected to Redpanda (Kafka, Schema Registry, and Admin API). |
| 21 | + And I exec "curl localhost:8080/api/schema-registry/mode" in a Pod matching "app.kubernetes.io/instance=console", it will output: |
| 22 | + ``` |
| 23 | + {"mode":"READWRITE"} |
| 24 | + ``` |
| 25 | + And I exec "curl localhost:8080/api/topics" in a Pod matching "app.kubernetes.io/instance=console", it will output: |
| 26 | + ``` |
| 27 | + {"topics":[{"topicName":"_schemas","isInternal":false,"partitionCount":1,"replicationFactor":1,"cleanupPolicy":"compact","documentation":"NOT_CONFIGURED","logDirSummary":{"totalSizeBytes":117}}]} |
| 28 | + ``` |
| 29 | + And I exec "curl localhost:8080/api/console/endpoints | grep -o '{[^{}]*DebugBundleService[^{}]*}'" in a Pod matching "app.kubernetes.io/instance=console", it will output: |
| 30 | + ``` |
| 31 | + {"endpoint":"redpanda.api.console.v1alpha1.DebugBundleService","method":"POST","isSupported":true} |
| 32 | + ``` |
| 33 | + |
| 34 | + Scenario: Using staticConfig |
| 35 | + When I apply Kubernetes manifest: |
| 36 | + ```yaml |
| 37 | + --- |
| 38 | + apiVersion: cluster.redpanda.com/v1alpha2 |
| 39 | + kind: Console |
| 40 | + metadata: |
| 41 | + name: console |
| 42 | + spec: |
| 43 | + cluster: |
| 44 | + staticConfiguration: |
| 45 | + kafka: |
| 46 | + brokers: |
| 47 | + - basic-0.basic.${NAMESPACE}.svc.cluster.local.:9093 |
| 48 | + tls: |
| 49 | + caCertSecretRef: |
| 50 | + name: "basic-default-cert" |
| 51 | + key: "ca.crt" |
| 52 | + admin: |
| 53 | + urls: |
| 54 | + - https://basic-0.basic.${NAMESPACE}.svc.cluster.local.:9644 |
| 55 | + tls: |
| 56 | + caCertSecretRef: |
| 57 | + name: "basic-default-cert" |
| 58 | + key: "ca.crt" |
| 59 | + schemaRegistry: |
| 60 | + urls: |
| 61 | + - https://basic-0.basic.${NAMESPACE}.svc.cluster.local.:8081 |
| 62 | + tls: |
| 63 | + caCertSecretRef: |
| 64 | + name: "basic-default-cert" |
| 65 | + key: "ca.crt" |
| 66 | + ``` |
| 67 | + Then Console "console" will be healthy |
| 68 | + # These steps demonstrate that console is correctly connected to Redpanda (Kafka, Schema Registry, and Admin API). |
| 69 | + And I exec "curl localhost:8080/api/schema-registry/mode" in a Pod matching "app.kubernetes.io/instance=console", it will output: |
| 70 | + ``` |
| 71 | + {"mode":"READWRITE"} |
| 72 | + ``` |
| 73 | + And I exec "curl localhost:8080/api/topics" in a Pod matching "app.kubernetes.io/instance=console", it will output: |
| 74 | + ``` |
| 75 | + {"topics":[{"topicName":"_schemas","isInternal":false,"partitionCount":1,"replicationFactor":1,"cleanupPolicy":"compact","documentation":"NOT_CONFIGURED","logDirSummary":{"totalSizeBytes":117}}]} |
| 76 | + ``` |
| 77 | + And I exec "curl localhost:8080/api/console/endpoints | grep -o '{[^{}]*DebugBundleService[^{}]*}'" in a Pod matching "app.kubernetes.io/instance=console", it will output: |
| 78 | + ``` |
| 79 | + {"endpoint":"redpanda.api.console.v1alpha1.DebugBundleService","method":"POST","isSupported":true} |
| 80 | + ``` |
0 commit comments