Skip to content

Commit bd25605

Browse files
authored
Merge pull request kubernetes#123435 from tallclair/apparmor-ga
AppArmor fields API
2 parents e062103 + 2d86cbf commit bd25605

File tree

103 files changed

+4462
-1424
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+4462
-1424
lines changed

api/openapi-spec/swagger.json

Lines changed: 34 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/openapi-spec/v3/api__v1_openapi.json

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,32 @@
263263
},
264264
"type": "object"
265265
},
266+
"io.k8s.api.core.v1.AppArmorProfile": {
267+
"description": "AppArmorProfile defines a pod or container's AppArmor settings.",
268+
"properties": {
269+
"localhostProfile": {
270+
"description": "localhostProfile indicates a profile loaded on the node that should be used. The profile must be preconfigured on the node to work. Must match the loaded name of the profile. Must be set if and only if type is \"Localhost\".",
271+
"type": "string"
272+
},
273+
"type": {
274+
"default": "",
275+
"description": "type indicates which kind of AppArmor profile will be applied. Valid options are:\n Localhost - a profile pre-loaded on the node.\n RuntimeDefault - the container runtime's default profile.\n Unconfined - no AppArmor enforcement.",
276+
"type": "string"
277+
}
278+
},
279+
"required": [
280+
"type"
281+
],
282+
"type": "object",
283+
"x-kubernetes-unions": [
284+
{
285+
"discriminator": "type",
286+
"fields-to-discriminateBy": {
287+
"localhostProfile": "LocalhostProfile"
288+
}
289+
}
290+
]
291+
},
266292
"io.k8s.api.core.v1.AttachedVolume": {
267293
"description": "AttachedVolume describes a volume attached to a node",
268294
"properties": {
@@ -5161,6 +5187,14 @@
51615187
"io.k8s.api.core.v1.PodSecurityContext": {
51625188
"description": "PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.",
51635189
"properties": {
5190+
"appArmorProfile": {
5191+
"allOf": [
5192+
{
5193+
"$ref": "#/components/schemas/io.k8s.api.core.v1.AppArmorProfile"
5194+
}
5195+
],
5196+
"description": "appArmorProfile is the AppArmor options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows."
5197+
},
51645198
"fsGroup": {
51655199
"description": "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows.",
51665200
"format": "int64",
@@ -5399,7 +5433,7 @@
53995433
"$ref": "#/components/schemas/io.k8s.api.core.v1.PodOS"
54005434
}
54015435
],
5402-
"description": "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup"
5436+
"description": "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.securityContext.appArmorProfile - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.appArmorProfile - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup"
54035437
},
54045438
"overhead": {
54055439
"additionalProperties": {
@@ -6999,6 +7033,14 @@
69997033
"description": "AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.",
70007034
"type": "boolean"
70017035
},
7036+
"appArmorProfile": {
7037+
"allOf": [
7038+
{
7039+
"$ref": "#/components/schemas/io.k8s.api.core.v1.AppArmorProfile"
7040+
}
7041+
],
7042+
"description": "appArmorProfile is the AppArmor options to use by this container. If set, this profile overrides the pod's appArmorProfile. Note that this field cannot be set when spec.os.name is windows."
7043+
},
70027044
"capabilities": {
70037045
"allOf": [
70047046
{

api/openapi-spec/v3/apis__apps__v1_openapi.json

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,6 +1391,32 @@
13911391
},
13921392
"type": "object"
13931393
},
1394+
"io.k8s.api.core.v1.AppArmorProfile": {
1395+
"description": "AppArmorProfile defines a pod or container's AppArmor settings.",
1396+
"properties": {
1397+
"localhostProfile": {
1398+
"description": "localhostProfile indicates a profile loaded on the node that should be used. The profile must be preconfigured on the node to work. Must match the loaded name of the profile. Must be set if and only if type is \"Localhost\".",
1399+
"type": "string"
1400+
},
1401+
"type": {
1402+
"default": "",
1403+
"description": "type indicates which kind of AppArmor profile will be applied. Valid options are:\n Localhost - a profile pre-loaded on the node.\n RuntimeDefault - the container runtime's default profile.\n Unconfined - no AppArmor enforcement.",
1404+
"type": "string"
1405+
}
1406+
},
1407+
"required": [
1408+
"type"
1409+
],
1410+
"type": "object",
1411+
"x-kubernetes-unions": [
1412+
{
1413+
"discriminator": "type",
1414+
"fields-to-discriminateBy": {
1415+
"localhostProfile": "LocalhostProfile"
1416+
}
1417+
}
1418+
]
1419+
},
13941420
"io.k8s.api.core.v1.AzureDiskVolumeSource": {
13951421
"description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
13961422
"properties": {
@@ -3578,6 +3604,14 @@
35783604
"io.k8s.api.core.v1.PodSecurityContext": {
35793605
"description": "PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.",
35803606
"properties": {
3607+
"appArmorProfile": {
3608+
"allOf": [
3609+
{
3610+
"$ref": "#/components/schemas/io.k8s.api.core.v1.AppArmorProfile"
3611+
}
3612+
],
3613+
"description": "appArmorProfile is the AppArmor options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows."
3614+
},
35813615
"fsGroup": {
35823616
"description": "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows.",
35833617
"format": "int64",
@@ -3816,7 +3850,7 @@
38163850
"$ref": "#/components/schemas/io.k8s.api.core.v1.PodOS"
38173851
}
38183852
],
3819-
"description": "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup"
3853+
"description": "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.securityContext.appArmorProfile - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.appArmorProfile - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup"
38203854
},
38213855
"overhead": {
38223856
"additionalProperties": {
@@ -4524,6 +4558,14 @@
45244558
"description": "AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.",
45254559
"type": "boolean"
45264560
},
4561+
"appArmorProfile": {
4562+
"allOf": [
4563+
{
4564+
"$ref": "#/components/schemas/io.k8s.api.core.v1.AppArmorProfile"
4565+
}
4566+
],
4567+
"description": "appArmorProfile is the AppArmor options to use by this container. If set, this profile overrides the pod's appArmorProfile. Note that this field cannot be set when spec.os.name is windows."
4568+
},
45274569
"capabilities": {
45284570
"allOf": [
45294571
{

0 commit comments

Comments
 (0)