diff --git a/apis/clusters/v1beta1/kafkaconnect_webhook.go b/apis/clusters/v1beta1/kafkaconnect_webhook.go index 2213eacf8..188bd1cad 100644 --- a/apis/clusters/v1beta1/kafkaconnect_webhook.go +++ b/apis/clusters/v1beta1/kafkaconnect_webhook.go @@ -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() } diff --git a/config/samples/clusters_v1beta1_kafka.yaml b/config/samples/clusters_v1beta1_kafka.yaml index 9306eaaba..8c3ea2a3c 100644 --- a/config/samples/clusters_v1beta1_kafka.yaml +++ b/config/samples/clusters_v1beta1_kafka.yaml @@ -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 @@ -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 diff --git a/config/samples/clusters_v1beta1_kafkaconnect.yaml b/config/samples/clusters_v1beta1_kafkaconnect.yaml index 3371052e5..1dba1f5bc 100644 --- a/config/samples/clusters_v1beta1_kafkaconnect.yaml +++ b/config/samples/clusters_v1beta1_kafkaconnect.yaml @@ -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 diff --git a/config/samples/clusters_v1beta1_kafkaconnect_inherits.yaml b/config/samples/clusters_v1beta1_kafkaconnect_inherits.yaml index e19afa8af..584820a3c 100644 --- a/config/samples/clusters_v1beta1_kafkaconnect_inherits.yaml +++ b/config/samples/clusters_v1beta1_kafkaconnect_inherits.yaml @@ -3,4 +3,4 @@ kind: KafkaConnect metadata: name: kafkaconnect-inherited spec: - inheritsFrom: "c1a84b4f-9b67-43e0-ac33-038290aea71d" \ No newline at end of file + inheritsFrom: "265b75a5-f20f-4c3c-8ec2-0d03a8a8ef21" \ No newline at end of file diff --git a/doc/clusters/cluster-inherits.md b/doc/clusters/cluster-inherits.md new file mode 100644 index 000000000..aec36f7cb --- /dev/null +++ b/doc/clusters/cluster-inherits.md @@ -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. \ No newline at end of file