Skip to content

Commit 46ef0ae

Browse files
committed
remove the AI slop
1 parent 8d64cfe commit 46ef0ae

1 file changed

Lines changed: 35 additions & 9 deletions

File tree

README.md

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,27 +52,53 @@ make test
5252

5353
Afterward, the project can be started in IntelliJ by navigating to `Run` -> `Run '...'`.
5454

55-
## Test the CRD on the Dev Services cluster and AI assistance
55+
## Test the CRD on the ephemeral Dev Services cluster
5656

57-
This example demonstrates how to set up a local development environment using Quarkus Dev Services and AI assistance to generate Kubernetes resources.
57+
This example demonstrates how to set up a local development environment using Quarkus Dev Services to test the Operator manually.
58+
As the K3s cluster port and the secrets change on every `./gradlew quarkusDev` run, you will have to manually update the port and secrets in the `~/.kube/config` every time.
5859

5960
### 1. Configure Kubeconfig from Dev Services
6061

6162
When running in dev mode (`make run` or via IntelliJ), Quarkus starts the pre-configured K3s and PostgreSQL Dev Services.
6263

6364
1. Access the Quarkus Dev UI at [http://localhost:8080/q/dev-ui/dev-services](http://localhost:8080/q/dev-ui/dev-services).
6465
2. Locate the properties for the `kubernetes-client` Dev Service.
65-
3. Ask an AI to convert these properties into a **Kubeconfig YAML** format.
66+
3. Convert these properties into a **Kubeconfig YAML** format, see the example below.
6667
4. Merge this configuration into your local `~/.kube/config`. This allows your local environment to communicate with the ephemeral Kubernetes cluster provided by Dev Services.
6768

69+
```yml
70+
apiVersion: v1
71+
kind: Config
72+
current-context: quarkus-cluster
73+
clusters:
74+
- cluster:
75+
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJkekNDQVIyZ0F3SUJBZ0lCQURBS0JnZ3Foa2pPUFFRREFqQWpNU0V3SHdZRFZRUUREQmhyTTNNdGMyVnkKZG1WeUxXTmhRREUzTmpjNU56UTFNREF3SGhjTk1qWXdNVEE1TVRZd01UUXdXaGNOTXpZd01UQTNNVFl3TVRRdwpXakFqTVNFd0h3WURWUVFEREJock0zTXRjMlZ5ZG1WeUxXTmhRREUzTmpjNU56UTFNREF3V1RBVEJnY3Foa2pPClBRSUJCZ2dxaGtqT1BRTUJCd05DQUFRYlpRQmgzdlNXMVExd1pST0tBQ1NlY3dreXhQUXVjVm9FN0tVM1MrQnYKZ1hJYzdCREQrb2JqTXFETXZuRkpNUlBCYUw0R2RDVVNsRDM3QzJUV01DNjlvMEl3UURBT0JnTlZIUThCQWY4RQpCQU1DQXFRd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZEJnTlZIUTRFRmdRVURPdkI4eWt1VFJBTDRjRjhNOUo4Cit3STh5U2t3Q2dZSUtvWkl6ajBFQXdJRFNBQXdSUUlnQWlZb0RsR2txUXd6WXVzcno5V3RMcUdEMXE2SmR6TVYKdW1nTFFPeFdNTEFDSVFDenQyMmxVTXJMNm1zMnBSRTBpQmZ3azNLbGdKSmJzZkp0YlI0bW9mRE16UT09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
76+
server: https://localhost:53658
77+
name: quarkus-cluster
78+
# ... more clusters
79+
contexts:
80+
- context:
81+
cluster: quarkus-cluster
82+
namespace: default
83+
user: quarkus-user
84+
name: quarkus-context
85+
# ... more contexts
86+
users:
87+
- name: quarkus-user
88+
user:
89+
client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJrakNDQVRlZ0F3SUJBZ0lJTlpCUDhySWZaTlV3Q2dZSUtvWkl6ajBFQXdJd0l6RWhNQjhHQTFVRUF3d1kKYXpOekxXTnNhV1Z1ZEMxallVQXhOelkzT1RjME5UQXdNQjRYRFRJMk1ERXdPVEUyTURFME1Gb1hEVEkzTURFdwpPVEUyTURFME1Gb3dNREVYTUJVR0ExVUVDaE1PYzNsemRHVnRPbTFoYzNSbGNuTXhGVEFUQmdOVkJBTVRESE41CmMzUmxiVHBoWkcxcGJqQlpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJIdnE1UWxVWVBFRldvYXEKRTJN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RQ0lFaVlLQlpEVjhVZDZHN3BGU2doSVU5UVZYQ3FYSmx6MHNRbWpnRTJUeUZHCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
90+
client-key-data: LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1IY0NBUUVFSUFuN1dTOWJGZUhlaUpKMmJHcHFFTjBJc28vQzR3VEVNRFBSdENRNzNYMmhvQW9HQ0NxR1NNNDkKQXdFSG9VUURRZ0FFZStybENWUmc4UVZhaHFvVFl3U3Ztb0x3M1FUVmpZVFlBdnY1b2kyUlhkcDhZVWpiU1FEegoyN0VuNnhsb0lXeWRHeHRybCtTZE1jNkZ1YnhkMk5IRU9nPT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo=
91+
# ... more users
92+
```
93+
6894
### 2. Create PostgreSQL Connection and Secret
6995

7096
For the `postgresql` Dev Service, you can generate the necessary Custom Resources to test the operator:
7197

7298
1. From the Dev UI, get the `postgresql` Dev Service properties (username, password, host, port).
73-
2. Ask the AI to convert the `postgresql` Dev Service properties to a **Basic Auth Secret** and a **ClusterConnection** CR instance.
74-
3. Provide the AI with the `ClusterConnection` CRD definition from `build/kubernetes/clusterconnections.postgresql.aboutbits.it-v1.yml` as a reference.
75-
4. Apply the generated files using IntelliJ or `kubectl`.
99+
2. Convert the `postgresql` Dev Service properties to a **Basic Auth Secret** and a **ClusterConnection** CR instance.
100+
For more details see class `ClusterConnectionSpec` or the `ClusterConnection` CRD definition from `build/kubernetes/clusterconnections.postgresql.aboutbits.it-v1.yml` as a reference.
101+
3. Apply the generated files using IntelliJ or `kubectl`.
76102
![Apply Cluster Connection](docs/apply-cluster-connection.png)
77103

78104
**Example Secret (`secret.yml`):**
@@ -113,9 +139,9 @@ spec:
113139

114140
Similarly, you can create a `Role` resource:
115141

116-
1. Ask the AI to convert the desired role properties to a **Role** CR instance.
117-
2. Provide the AI with the `Role` CRD definition from `build/kubernetes/roles.postgresql.aboutbits.it-v1.yml` as a reference.
118-
3. Apply the file using IntelliJ or `kubectl`.
142+
1. Manually create a **Role** CR instance.
143+
For more details see class `RoleSpec` or the `Role` CRD definition from `build/kubernetes/roles.postgresql.aboutbits.it-v1.yml` as a reference.
144+
2. Apply the file using IntelliJ or `kubectl`.
119145

120146
**Example Role (`role.yml`):**
121147

0 commit comments

Comments
 (0)