Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Add opt-in integration resource provision service #1297

Merged
merged 2 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

<!-- towncrier release notes start -->
## 0.18.3 (2025-01-22)

### Improvements

- Opt-in integration resource provision by Port

## 0.18.2 (2025-01-21)

### Improvements

- Updated the search entitites query sent to port with one rule of identifier instead of many
- Updated the search entities query sent to port with one rule of identifier instead of many

## 0.18.1 (2025-01-21)

### Improvements

- Updated the search entitites query sent to port with blueprint
- Updated the search entities query sent to port with blueprint

## 0.18.0 (2025-01-15)

Expand Down
288 changes: 143 additions & 145 deletions integrations/kafka/.port/resources/blueprints.json
Original file line number Diff line number Diff line change
@@ -1,154 +1,152 @@
[
{
"identifier":"kafkaCluster",
"title":"Cluster",
"icon":"Kafka",
"schema":{
"properties":{
"controllerId":{
"title":"Controller ID",
"type":"string"
}
{
"identifier": "kafkaCluster",
"title": "Cluster",
"icon": "Kafka",
"schema": {
"properties": {
"controllerId": {
"title": "Controller ID",
"type": "string"
}
}
}
}
},
{
"identifier":"kafkaBroker",
"title":"Broker",
"icon":"Kafka",
"schema":{
"properties":{
"address":{
"title":"Address",
"type":"string"
},
"region":{
"title":"Region",
"type":"string"
},
"version":{
"title":"Version",
"type":"string"
},
"config":{
"title":"Config",
"type":"object"
}
}
},
"relations":{
"cluster":{
"target":"kafkaCluster",
"required":true,
"many":false
}
}
},
{
"identifier": "kafkaTopic",
"title": "Topic",
"icon": "Kafka",
"schema": {
"properties": {
"replicas": {
"title": "Replicas",
"type": "number"
},
"partitions": {
"title": "Partitions",
"type": "number"
},
"compaction": {
"title": "Compaction",
"type": "boolean"
},
"retention": {
"title": "Retention",
"type": "boolean"
},
"deleteRetentionTime": {
"title": "Delete Retention Time",
"type": "number"
},
"partitionsMetadata": {
"title": "Partitions Metadata",
"items": {
"type": "object"
},
"type": "array"
},
{
"identifier": "kafkaBroker",
"title": "Broker",
"icon": "Kafka",
"schema": {
"properties": {
"address": {
"title": "Address",
"type": "string"
},
"region": {
"title": "Region",
"type": "string"
},
"version": {
"title": "Version",
"type": "string"
},
"config": {
"title": "Config",
"type": "object"
}
}
},
"config": {
"title": "Config",
"type": "object"
"relations": {
"cluster": {
"target": "kafkaCluster",
"required": true,
"many": false
}
}
}
},
"relations": {
"cluster": {
"target":"kafkaCluster",
"required":true,
"many":false
{
"identifier": "kafkaTopic",
"title": "Topic",
"icon": "Kafka",
"schema": {
"properties": {
"replicas": {
"title": "Replicas",
"type": "number"
},
"partitions": {
"title": "Partitions",
"type": "number"
},
"compaction": {
"title": "Compaction",
"type": "boolean"
},
"retention": {
"title": "Retention",
"type": "boolean"
},
"deleteRetentionTime": {
"title": "Delete Retention Time",
"type": "number"
},
"partitionsMetadata": {
"title": "Partitions Metadata",
"items": {
"type": "object"
},
"type": "array"
},
"config": {
"title": "Config",
"type": "object"
}
}
},
"brokers":{
"target":"kafkaBroker",
"required":false,
"many":true
}
}
},
{
"identifier":"kafkaConsumerGroup",
"title":"Consumer Group",
"icon":"Kafka",
"schema":{
"properties":{
"state":{
"title":"State",
"type":"string",
"description":"The current state of the consumer group."
},
"members":{
"title":"Members",
"type":"array",
"description":"List of members in the consumer group.",
"items":{
"type":"string"
}
},
"coordinator":{
"title":"Coordinator",
"type":"number",
"description":"Broker ID of the coordinator for the consumer group."
},
"partition_assignor":{
"title":"Partition Assignor",
"type":"string",
"description":"Strategy used to assign partitions to consumers."
},
"is_simple_consumer_group":{
"title":"Is Simple Consumer Group",
"type":"boolean",
"description":"Indicates if the group is a simple consumer group."
},
"authorized_operations":{
"title":"Authorized Operations",
"type":"array",
"description":"List of operations authorized for the consumer group.",
"items":{
"type":"string"
}
}
"relations": {
"cluster": {
"target": "kafkaCluster",
"required": true,
"many": false
},
"brokers": {
"target": "kafkaBroker",
"required": false,
"many": true
}
}
},
"calculationProperties":{

},
"relations":{
"cluster":{
"target":"kafkaCluster",
"required":true,
"many":false
},
{
"identifier": "kafkaConsumerGroup",
"title": "Consumer Group",
"icon": "Kafka",
"schema": {
"properties": {
"state": {
"title": "State",
"type": "string",
"description": "The current state of the consumer group."
},
"members": {
"title": "Members",
"type": "array",
"description": "List of members in the consumer group.",
"items": {
"type": "string"
}
},
"coordinator": {
"title": "Coordinator",
"type": "number",
"description": "Broker ID of the coordinator for the consumer group."
},
"partition_assignor": {
"title": "Partition Assignor",
"type": "string",
"description": "Strategy used to assign partitions to consumers."
},
"is_simple_consumer_group": {
"title": "Is Simple Consumer Group",
"type": "boolean",
"description": "Indicates if the group is a simple consumer group."
},
"authorized_operations": {
"title": "Authorized Operations",
"type": "array",
"description": "List of operations authorized for the consumer group.",
"items": {
"type": "string"
}
}
}
},
"calculationProperties": {},
"relations": {
"cluster": {
"target": "kafkaCluster",
"required": true,
"many": false
}
}
}
}
}
]
2 changes: 1 addition & 1 deletion integrations/kafka/examples/consumer_groups.entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
"state": "STABLE"
},
"updatedAt": "2025-01-17T14:23:38.182Z"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
"partition_assignor": "range",
"is_simple_consumer_group": false,
"authorized_operations": null
}
}
3 changes: 3 additions & 0 deletions port_ocean/clients/port/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from port_ocean.clients.port.mixins.entities import EntityClientMixin
from port_ocean.clients.port.mixins.integrations import IntegrationClientMixin
from port_ocean.clients.port.mixins.migrations import MigrationClientMixin
from port_ocean.clients.port.mixins.organization import OrganizationClientMixin
from port_ocean.clients.port.types import (
KafkaCreds,
)
Expand All @@ -21,6 +22,7 @@ class PortClient(
IntegrationClientMixin,
BlueprintClientMixin,
MigrationClientMixin,
OrganizationClientMixin,
):
def __init__(
self,
Expand Down Expand Up @@ -48,6 +50,7 @@ def __init__(
)
BlueprintClientMixin.__init__(self, self.auth, self.client)
MigrationClientMixin.__init__(self, self.auth, self.client)
OrganizationClientMixin.__init__(self, self.auth, self.client)

async def get_kafka_creds(self) -> KafkaCreds:
logger.info("Fetching organization kafka credentials")
Expand Down
Loading
Loading