Skip to content

Commit fe20849

Browse files
fnuarnavsuxi-ms
authored andcommitted
added missing securityContext field to 2022-10-01-preview and 2023-01-01-preview swagger (#23447)
* added missing securityContext field to 2022-10-01-preview swagger * added seccomp to custom-words * added security context properties to api version 2023-02-01-preview * run prettier-fix
1 parent b9c7fee commit fe20849

File tree

3 files changed

+117
-0
lines changed

3 files changed

+117
-0
lines changed

custom-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,6 +1919,7 @@ SDWAN
19191919
searchbuffer
19201920
searchindex
19211921
searchservice
1922+
seccomp
19221923
SECG
19231924
secondarybytes
19241925
SECP

specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/containerInstance.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,62 @@
947947
"readinessProbe": {
948948
"description": "The readiness probe.",
949949
"$ref": "#/definitions/ContainerProbe"
950+
},
951+
"securityContext": {
952+
"description": "The container security properties.",
953+
"$ref": "#/definitions/SecurityContextDefinition"
954+
}
955+
}
956+
},
957+
"SecurityContextDefinition": {
958+
"description": "The security context for the container.",
959+
"type": "object",
960+
"properties": {
961+
"privileged": {
962+
"type": "boolean",
963+
"description": "The flag to determine if the container permissions is elevated to Privileged."
964+
},
965+
"allowPrivilegeEscalation": {
966+
"type": "boolean",
967+
"description": "A boolean value indicating whether the init process can elevate its privileges"
968+
},
969+
"capabilities": {
970+
"description": "The capabilities to add or drop from a container.",
971+
"$ref": "#/definitions/SecurityContextCapabilitiesDefinition"
972+
},
973+
"runAsGroup": {
974+
"type": "integer",
975+
"format": "int32",
976+
"description": "Sets the User GID for the container."
977+
},
978+
"runAsUser": {
979+
"type": "integer",
980+
"format": "int32",
981+
"description": "Sets the User UID for the container."
982+
},
983+
"seccompProfile": {
984+
"type": "string",
985+
"description": "a base64 encoded string containing the contents of the JSON in the seccomp profile"
986+
}
987+
}
988+
},
989+
"SecurityContextCapabilitiesDefinition": {
990+
"description": "The capabilities to add or drop from a container.",
991+
"type": "object",
992+
"properties": {
993+
"add": {
994+
"type": "array",
995+
"items": {
996+
"type": "string"
997+
},
998+
"description": "The capabilities to add to the container."
999+
},
1000+
"drop": {
1001+
"type": "array",
1002+
"items": {
1003+
"type": "string"
1004+
},
1005+
"description": "The capabilities to drop from the container."
9501006
}
9511007
}
9521008
},
@@ -2361,6 +2417,10 @@
23612417
"x-ms-identifiers": [
23622418
"name"
23632419
]
2420+
},
2421+
"securityContext": {
2422+
"description": "The container security properties.",
2423+
"$ref": "#/definitions/SecurityContextDefinition"
23642424
}
23652425
}
23662426
},

specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2023-02-01-preview/containerInstance.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,62 @@
938938
"readinessProbe": {
939939
"description": "The readiness probe.",
940940
"$ref": "#/definitions/ContainerProbe"
941+
},
942+
"securityContext": {
943+
"description": "The container security properties.",
944+
"$ref": "#/definitions/SecurityContextDefinition"
945+
}
946+
}
947+
},
948+
"SecurityContextDefinition": {
949+
"description": "The security context for the container.",
950+
"type": "object",
951+
"properties": {
952+
"privileged": {
953+
"type": "boolean",
954+
"description": "The flag to determine if the container permissions is elevated to Privileged."
955+
},
956+
"allowPrivilegeEscalation": {
957+
"type": "boolean",
958+
"description": "A boolean value indicating whether the init process can elevate its privileges"
959+
},
960+
"capabilities": {
961+
"description": "The capabilities to add or drop from a container.",
962+
"$ref": "#/definitions/SecurityContextCapabilitiesDefinition"
963+
},
964+
"runAsGroup": {
965+
"type": "integer",
966+
"format": "int32",
967+
"description": "Sets the User GID for the container."
968+
},
969+
"runAsUser": {
970+
"type": "integer",
971+
"format": "int32",
972+
"description": "Sets the User UID for the container."
973+
},
974+
"seccompProfile": {
975+
"type": "string",
976+
"description": "a base64 encoded string containing the contents of the JSON in the seccomp profile"
977+
}
978+
}
979+
},
980+
"SecurityContextCapabilitiesDefinition": {
981+
"description": "The capabilities to add or drop from a container.",
982+
"type": "object",
983+
"properties": {
984+
"add": {
985+
"type": "array",
986+
"items": {
987+
"type": "string"
988+
},
989+
"description": "The capabilities to add to the container."
990+
},
991+
"drop": {
992+
"type": "array",
993+
"items": {
994+
"type": "string"
995+
},
996+
"description": "The capabilities to drop from the container."
941997
}
942998
}
943999
},

0 commit comments

Comments
 (0)