-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Expand file tree
/
Copy pathbase.tsp
More file actions
234 lines (179 loc) · 5.57 KB
/
base.tsp
File metadata and controls
234 lines (179 loc) · 5.57 KB
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
import "@azure-tools/typespec-azure-resource-manager";
using Azure.ResourceManager;
namespace Microsoft.IoTOperationsMQ;
#suppress "@azure-tools/typespec-providerhub/no-inline-model" "Valid Inline Model of Extended location"
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Extended location is a valid property"
alias ExtendedLocation = {
@doc("Extended Location")
@visibility("read", "create")
extendedLocation: ExtendedLocationProperty;
};
@doc("ExtendedLocation properties")
model ExtendedLocationProperty {
@doc("The name of the extended location.")
name: string;
@doc("Type of ExtendedLocation.")
type: ExtendedLocationType;
}
@doc("The enum defining type of ExtendedLocation accepted.")
union ExtendedLocationType {
string,
@doc("CustomLocation type")
"CustomLocation",
}
@doc("The enum defining status of resource.")
union ProvisioningState {
string,
ResourceProvisioningState,
@doc("Resource is getting provisioned.")
Provisioning: "Provisioning",
@doc("Resource is Updating.")
Updating: "Updating",
@doc("Resource is Deleting.")
Deleting: "Deleting",
@doc("Resource has been Accepted.")
Accepted: "Accepted",
}
@doc("Defines the Docker image details")
model ContainerImage {
@doc("Image pull policy.")
pullPolicy?: string;
@doc("Image pull secrets.")
pullSecrets?: string;
@doc("The Docker image name.")
repository: string;
@doc("The Docker image tag.")
tag: string;
}
@doc("Defines the Node Tolerations details")
model NodeTolerations {
@doc("Toleration effect.")
effect: string;
@doc("Toleration key.")
key: string;
@doc("Toleration operator like 'Exists', 'Equal' etc.")
operator: string;
@doc("Toleration Value.")
value: string;
}
@doc("Cert Manager CA Cert properties")
model CertManagerCertOptions {
@doc("Duration of CA cert.")
duration: string = "720h";
@doc("Cert Manager private key.")
privateKey: CertManagerPrivateKey;
@doc("Renew before time of CA cert.")
renewBefore: string = "240h";
}
@doc("Cert Manager private key properties")
model CertManagerPrivateKey {
@doc("algorithm for private key.")
algorithm: string = "ECDSA";
@doc("cert-manager rotationPolicy.")
rotationPolicy: string = "Always";
@doc("size of private key.")
@minValue(0)
@maxValue(65535)
size: int32 = 256;
}
@doc("Cert-Manager issuerRef properties")
model CertManagerIssuerRef {
@doc("group of issuer.")
group: string = "cert-manager.io";
@doc("kind of issuer (Issuer or ClusterIssuer).")
kind: string;
@doc("name of issuer.")
name: string;
}
@doc("SANs for certificate.")
model SanForCert {
@doc("DNS SANs.")
dns: string[] = #[];
@doc("IP address SANs.")
ip: string[] = #[];
}
@doc("Mqtt Protocol types")
union MqttProtocol {
string,
@doc("Mqttv3")
"v3",
@doc("Mqttv5")
"v5",
}
@doc("Mqtt Local Broker ConnectionSpec details")
model LocalBrokerConnectionSpec {
@doc("The authentication methods for LocalBroker connection. NOTE - Enum only one method at a time is supported.")
authentication?: LocalBrokerAuthenticationMethods;
@doc("The endpoint of local broker to connect to.")
endpoint?: string = "aio-mq-dmqtt-frontend:1883";
@doc("TLS details for Local broker Connection.")
tls?: LocalBrokerConnectionTls;
}
@doc("Mqtt Local Broker Authentication details. Only one method at a time is supported. Default - kubernetes authentication")
model LocalBrokerAuthenticationMethods {
@doc("Kubernetes local broker authentication method.")
kubernetes: LocalBrokerKubernetesAuthentication;
}
@doc("Local Broker Kubernetes Authentication")
model LocalBrokerKubernetesAuthentication {
@doc("Secret Path where SAT is mounted.")
secretPath?: string = "/var/run/serviceaccount/localbroker";
@doc("Token name where SAT is mounted on secret path.")
serviceAccountTokenName?: string = "sat";
}
@doc("Managed identity authentication details.")
model ManagedIdentityAuthentication {
@doc("Token audience.")
audience: string;
@doc("Arc Extension name.")
extensionName?: string;
}
@doc("Mqtt Local Broker Connection TLS details")
model LocalBrokerConnectionTls {
@doc("Tls Enabled on Local Broker Connection.")
tlsEnabled?: boolean = false;
@doc("Trusted CA certificate config map name for Local Broker.")
trustedCaCertificateConfigMap?: string;
}
// Add keyvault properties
@doc("KeyVault certificate properties")
model KeyVaultCertificateProperties {
@doc("KeyVault properties.")
vault: KeyVaultConnectionProperties;
@doc("KeyVault CA chain secret details.")
vaultCaChainSecret?: KeyVaultSecretObject;
@doc("KeyVault Cert secret details.")
vaultCert: KeyVaultSecretObject;
}
// Add keyvault properties
@doc("KeyVault secret properties")
model KeyVaultSecretProperties {
@doc("KeyVault properties.")
vault: KeyVaultConnectionProperties;
@doc("KeyVault secret details.")
vaultSecret: KeyVaultSecretObject;
}
// Add KeyVault properties
@doc("KeyVault properties")
model KeyVaultConnectionProperties {
@doc("KeyVault credentials.")
credentials: KeyVaultCredentialsProperties;
@doc("KeyVault directoryId.")
directoryId: string;
@doc("KeyVault name.")
name: string;
}
// Add KeyVault credentials properties
@doc("KeyVault credentials properties. NOTE - Future this will be ENUM.")
model KeyVaultCredentialsProperties {
@doc("KeyVault service principal local secret name.")
servicePrincipalLocalSecretName: string;
}
//Add KeyVault secret properties
@doc("KeyVault secret object properties")
model KeyVaultSecretObject {
@doc("KeyVault secret name.")
name: string;
@doc("KeyVault secret version.")
version?: string;
}