Skip to content

Commit 3ff9cf7

Browse files
committed
Add extra
1 parent 092cadf commit 3ff9cf7

File tree

10 files changed

+18
-89
lines changed

10 files changed

+18
-89
lines changed

api/apparmorprofile/v1alpha1/apparmorprofile_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ type AppArmorAbstract struct {
8282
Network *AppArmorNetworkRules `json:"network,omitempty"`
8383
// Capability rules for Linux capabilities.
8484
Capability *AppArmorCapabilityRules `json:"capability,omitempty"`
85+
// Extra rules for other config.
86+
Extra string `json:"extra,omitempty"`
8587
}
8688

8789
// AppArmorProfileSpec defines the desired state of AppArmorProfile.

deploy/base-crds/crds/apparmorprofile.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ spec:
7272
type: string
7373
type: array
7474
type: object
75+
extra:
76+
description: Extra rules for other config.
77+
type: string
7578
filesystem:
7679
description: Filesystem rules for filesystem access.
7780
properties:

deploy/base/role.yaml

Lines changed: 0 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -326,92 +326,3 @@ rules:
326326
- securitycontextconstraints
327327
verbs:
328328
- use
329-
---
330-
apiVersion: rbac.authorization.k8s.io/v1
331-
kind: ClusterRole
332-
metadata:
333-
name: spo-webhook
334-
rules:
335-
- apiGroups:
336-
- ""
337-
resources:
338-
- events
339-
verbs:
340-
- create
341-
- apiGroups:
342-
- ""
343-
resources:
344-
- pods
345-
verbs:
346-
- get
347-
- list
348-
- watch
349-
- apiGroups:
350-
- security-profiles-operator.x-k8s.io
351-
resources:
352-
- profilebindings
353-
- profilerecordings
354-
verbs:
355-
- create
356-
- get
357-
- list
358-
- patch
359-
- update
360-
- watch
361-
- apiGroups:
362-
- security-profiles-operator.x-k8s.io
363-
resources:
364-
- profilebindings/finalizers
365-
- profilerecordings/finalizers
366-
verbs:
367-
- delete
368-
- get
369-
- patch
370-
- update
371-
- apiGroups:
372-
- security-profiles-operator.x-k8s.io
373-
resources:
374-
- profilebindings/status
375-
- profilerecordings/status
376-
verbs:
377-
- get
378-
- patch
379-
- update
380-
- apiGroups:
381-
- security-profiles-operator.x-k8s.io
382-
resources:
383-
- seccompprofiles
384-
- selinuxprofiles
385-
verbs:
386-
- get
387-
- list
388-
- watch
389-
---
390-
apiVersion: rbac.authorization.k8s.io/v1
391-
kind: Role
392-
metadata:
393-
name: spo-webhook
394-
namespace: security-profiles-operator
395-
rules:
396-
- apiGroups:
397-
- coordination.k8s.io
398-
resources:
399-
- leases
400-
verbs:
401-
- create
402-
- apiGroups:
403-
- coordination.k8s.io
404-
resourceNames:
405-
- security-profiles-operator-webhook-lock
406-
resources:
407-
- leases
408-
verbs:
409-
- get
410-
- patch
411-
- update
412-
- apiGroups:
413-
- security.openshift.io
414-
resources:
415-
- securitycontextconstraints
416-
verbs:
417-
- use

deploy/helm/crds/crds.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2274,6 +2274,8 @@ spec:
22742274
type: string
22752275
type: array
22762276
type: object
2277+
extra:
2278+
type: string
22772279
filesystem:
22782280
description: Filesystem rules for filesystem access.
22792281
properties:

deploy/namespace-operator.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2274,6 +2274,8 @@ spec:
22742274
type: string
22752275
type: array
22762276
type: object
2277+
extra:
2278+
type: string
22772279
filesystem:
22782280
description: Filesystem rules for filesystem access.
22792281
properties:

deploy/openshift-dev.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ spec:
8585
type: string
8686
type: array
8787
type: object
88+
extra:
89+
type: string
8890
filesystem:
8991
description: Filesystem rules for filesystem access.
9092
properties:

deploy/openshift-downstream.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2274,6 +2274,8 @@ spec:
22742274
type: string
22752275
type: array
22762276
type: object
2277+
extra:
2278+
type: string
22772279
filesystem:
22782280
description: Filesystem rules for filesystem access.
22792281
properties:

deploy/operator.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2274,6 +2274,8 @@ spec:
22742274
type: string
22752275
type: array
22762276
type: object
2277+
extra:
2278+
type: string
22772279
filesystem:
22782280
description: Filesystem rules for filesystem access.
22792281
properties:

deploy/webhook-operator.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ spec:
8585
type: string
8686
type: array
8787
type: object
88+
extra:
89+
type: string
8890
filesystem:
8991
description: Filesystem rules for filesystem access.
9092
properties:

internal/pkg/daemon/apparmorprofile/crd2armor/crd2armor.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ profile {{.Name}} flags=({{.ProfileMode}},attach_disconnected,mediate_deleted) {
8080
{{end}}
8181
8282
# Raw rules placeholder
83+
{{.Abstract.Extra}}
8384
8485
# Add default deny for known information leak/priv esc paths
8586
deny @{PROC}/* w, # deny write for all files directly in /proc (not in a subdir)

0 commit comments

Comments
 (0)