-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
ArcStrimziKafkaExtension.json
129 lines (129 loc) · 4.56 KB
/
ArcStrimziKafkaExtension.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
"properties": {
"displayName": "Azure Arc-enabled Kubernetes clusters should have the Strimzi Kafka extension installed",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Strimzi Kafka extension provides the operators to install Kafka for building real-time data pipelines and streaming applications with security and observability capabilities. Learn more here: https://aka.ms/arc-strimzikafka-doc.",
"metadata": {
"category": "Kubernetes",
"version": "1.0.0"
},
"version": "1.0.0",
"parameters": {
"ExtensionVersion": {
"type": "String",
"metadata": {
"displayName": "Extension Version",
"description": "Provide the extension version of Arc enabled Strimzi Kafka. The extension version 0.1.0 supports Strimzi version 0.33.0 and kafka version 3.3.2. Refer to https://aka.ms/arc-strimzikafka-doc for available releases."
}
},
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"DeployIfNotExists",
"AuditIfNotExists",
"Disabled"
],
"defaultValue": "DeployIfNotExists"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Kubernetes/connectedClusters"
},
{
"field": "Microsoft.Kubernetes/connectedClusters/connectivityStatus",
"equals": "connected"
}
]
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.KubernetesConfiguration/extensions",
"existenceCondition": {
"allOf": [
{
"field": "Microsoft.KubernetesConfiguration/extensions/extensionType",
"equals": "microsoft.streamingforstrimzikafka"
},
{
"field": "Microsoft.KubernetesConfiguration/extensions/provisioningState",
"equals": "Succeeded"
}
]
},
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
],
"deployment": {
"properties": {
"mode": "incremental",
"parameters": {
"ExtensionVersion": {
"value": "[parameters('ExtensionVersion')]"
},
"clusterRegion": {
"value": "[field('location')]"
},
"clusterResourceId": {
"value": "[field('id')]"
}
},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"ExtensionVersion": {
"type": "string"
},
"clusterRegion": {
"type": "string"
},
"clusterResourceId": {
"type": "string"
}
},
"resources": [
{
"type": "Microsoft.KubernetesConfiguration/extensions",
"apiVersion": "2021-09-01",
"name": "strimzikafka",
"location": "[parameters('clusterRegion')]",
"version": "[parameters('ExtensionVersion')]",
"identity": {
"type": "SystemAssigned"
},
"properties": {
"extensionType": "microsoft.streamingforstrimzikafka",
"autoUpgradeMinorVersion": true,
"releaseTrain": "Stable",
"scope": {
"Cluster": {
"releaseNamespace": "streamingforstrimzikafka"
}
}
},
"scope": "[concat('Microsoft.Kubernetes/connectedClusters/', split(parameters('clusterResourceId'),'/')[8])]"
}
]
}
}
}
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/a8e653d9-b5d4-48a0-afe6-14d881f9ee9a",
"name": "a8e653d9-b5d4-48a0-afe6-14d881f9ee9a"
}