Skip to content

Commit

Permalink
doc for inheritance feature
Browse files Browse the repository at this point in the history
  • Loading branch information
worryg0d committed Mar 12, 2024
1 parent 63439da commit 74e7d96
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 5 deletions.
3 changes: 2 additions & 1 deletion apis/clusters/v1beta1/kafkaconnect_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ func (k *KafkaConnect) Default() {
if k.Spec.Inherits() && k.Status.ID == "" && k.Annotations[models.ResourceStateAnnotation] != models.SyncingEvent {
k.Spec = KafkaConnectSpec{
GenericClusterSpec: GenericClusterSpec{InheritsFrom: k.Spec.InheritsFrom},
DataCentres: []*KafkaConnectDataCentre{{}},
DataCentres: []*KafkaConnectDataCentre{},
TargetCluster: []*TargetCluster{},
}
k.Spec.GenericClusterSpec.setDefaultValues()
}
Expand Down
4 changes: 2 additions & 2 deletions config/samples/clusters_v1beta1_kafka.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Kafka
metadata:
name: kafka
spec:
name: "bohdan-kafka"
name: "example-kafka"
# inheritsFrom: 42a0fa34-a647-4a30-96e0-fde64aba0eae
version: "3.5.1"
pciCompliance: false
Expand All @@ -15,7 +15,7 @@ spec:
privateNetwork: false
slaTier: "NON_PRODUCTION"
# bundledUseOnly: true
clientBrokerAuthWithMtls: true
# clientBrokerAuthWithMtls: true
# dedicatedZookeeper:
# - nodeSize: "KDZ-DEV-t4g.small-30"
# nodesNumber: 3
Expand Down
2 changes: 1 addition & 1 deletion config/samples/clusters_v1beta1_kafkaconnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: KafkaConnect
metadata:
name: kafkaconnect-sample
spec:
name: "example-KC"
name: "bohdan-KC"
dataCentres:
- name: "US_EAST_1_DC_KAFKA"
nodesNumber: 3
Expand Down
2 changes: 1 addition & 1 deletion config/samples/clusters_v1beta1_kafkaconnect_inherits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ kind: KafkaConnect
metadata:
name: kafkaconnect-inherited
spec:
inheritsFrom: "c1a84b4f-9b67-43e0-ac33-038290aea71d"
inheritsFrom: "265b75a5-f20f-4c3c-8ec2-0d03a8a8ef21"
23 changes: 23 additions & 0 deletions doc/clusters/cluster-inherits.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Inheritance feature for clusters

If you already have created cluster on Instaclustr Console then you may use
this feature to manage the resource via Operator.

To use the feature you should apply the following yaml manifest:

```yaml
apiVersion: clusters.instaclustr.com/v1beta1
kind: KafkaConnect
metadata:
name: kafkaconnect-inherited
spec:
inheritsFrom: "265b75a5-f20f-4c3c-8ec2-0d03a8a8ef21"
```
Once you apply the following manifest it will get all cluster details
and update k8s resource spec and status.
Also, there are some specific cases for if you use inheritance feature for
Cadence cluster with AWSArchival enabled. It does the same work as with other
cluster resources, but it also creates a secret which stores your AWS Access Key ID
and AWS Access key which were used to create the cluster.

0 comments on commit 74e7d96

Please sign in to comment.