Skip to content

Commit 14f1d42

Browse files
committed
Update Microsoft.SecretsyncController API Spec
The kubernetesSecretType cannot be changed, so we update the lifecycle so that is can only be set on creation. Set the targetKey as the primary key for kubernetesSecretObjectMapping as this value must be unique across the entire list.
1 parent b2cb042 commit 14f1d42

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

specification/ews/SecretSyncController.Management/secretsync.tsp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ model SecretSyncProperties {
3737
serviceAccountName: string;
3838

3939
@doc("Type specifies the type of the Kubernetes secret object, e.g. \"Opaque\" or\"kubernetes.io/tls\". The controller must have permission to create secrets of the specified type.")
40+
@visibility(Lifecycle.Read, Lifecycle.Create)
4041
kubernetesSecretType: KubernetesSecretType;
4142

4243
@doc("ForceSynchronization can be used to force the secret synchronization. The secret synchronization is triggered by changing the value in this field. This field is not used to resolve synchronization conflicts.")
@@ -46,7 +47,7 @@ model SecretSyncProperties {
4647

4748
@doc("An array of SecretObjectData that maps secret data from the external secret provider to the Kubernetes secret. Each entry specifies the source secret in the external provider and the corresponding key in the Kubernetes secret.")
4849
@minItems(1)
49-
@identifiers(#[])
50+
@identifiers(#["targetKey"])
5051
objectSecretMapping: KubernetesSecretObjectMapping[];
5152

5253
@visibility(Lifecycle.Read)

specification/ews/resource-manager/Microsoft.SecretSyncController/preview/2024-08-21-preview/examples/SecretSyncs_Update_MaximumSet_Gen.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"properties": {
1414
"secretProviderClassName": "jttlpenhtpxfrrlxdsmqqvmvtmgqrficvqngkggjwciilrexenlstxncyvkqcydxrivkioujssncoaiysdklfouukczzdbxniipbyiqsarqaespuqrbbydwtdaulllostoomntkadklihemfpeffvuyvyilequiqewzspaootvkibrynbqrsbiptjdhywynvydaadprdc",
1515
"serviceAccountName": "fcldqfdfpktndlntuoxicsftelhefevovmlycflfwzckvamiqjnjugandqaqqeccsbzztfmmeunvhsafgerbcsdbnmsyqivygornebbkusuvphwghgouxvcbvmbydqjzoxextnyowsnyymadniwdrrxtogeveldpejixmsrzzfqkquaxdpzwvecevqwasxgxxchrfa",
16-
"kubernetesSecretType": "Opaque",
1716
"objectSecretMapping": [
1817
{
1918
"sourcePath": "ssrzmbvdiomkvzrdsyilwlfzicfydnbjwjsnohrppkukjddrunfslkrnexunuckmghixdssposvndpiqchpqrkjuqbapoisvqdvgstvdonsmlpsmticfvuhqlofpaxfdg",

specification/ews/resource-manager/Microsoft.SecretSyncController/preview/2024-08-21-preview/secretsynccontroller.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,11 @@
11201120
},
11211121
"kubernetesSecretType": {
11221122
"$ref": "#/definitions/KubernetesSecretType",
1123-
"description": "Type specifies the type of the Kubernetes secret object, e.g. \"Opaque\" or\"kubernetes.io/tls\". The controller must have permission to create secrets of the specified type."
1123+
"description": "Type specifies the type of the Kubernetes secret object, e.g. \"Opaque\" or\"kubernetes.io/tls\". The controller must have permission to create secrets of the specified type.",
1124+
"x-ms-mutability": [
1125+
"read",
1126+
"create"
1127+
]
11241128
},
11251129
"forceSynchronization": {
11261130
"type": "string",
@@ -1135,7 +1139,9 @@
11351139
"items": {
11361140
"$ref": "#/definitions/KubernetesSecretObjectMapping"
11371141
},
1138-
"x-ms-identifiers": []
1142+
"x-ms-identifiers": [
1143+
"targetKey"
1144+
]
11391145
},
11401146
"status": {
11411147
"$ref": "#/definitions/SecretSyncStatus",
@@ -1212,10 +1218,6 @@
12121218
"maxLength": 253,
12131219
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
12141220
},
1215-
"kubernetesSecretType": {
1216-
"$ref": "#/definitions/KubernetesSecretType",
1217-
"description": "Type specifies the type of the Kubernetes secret object, e.g. \"Opaque\" or\"kubernetes.io/tls\". The controller must have permission to create secrets of the specified type."
1218-
},
12191221
"forceSynchronization": {
12201222
"type": "string",
12211223
"description": "ForceSynchronization can be used to force the secret synchronization. The secret synchronization is triggered by changing the value in this field. This field is not used to resolve synchronization conflicts.",
@@ -1229,7 +1231,9 @@
12291231
"items": {
12301232
"$ref": "#/definitions/KubernetesSecretObjectMapping"
12311233
},
1232-
"x-ms-identifiers": []
1234+
"x-ms-identifiers": [
1235+
"targetKey"
1236+
]
12331237
}
12341238
}
12351239
},

0 commit comments

Comments
 (0)