Skip to content

Commit

Permalink
Merge pull request kubernetes#1526 from jcantrill/patch-2
Browse files Browse the repository at this point in the history
Update forwarder-input-selectors.md
  • Loading branch information
openshift-merge-bot[bot] authored Jan 3, 2024
2 parents 0f456d7 + 1fb70eb commit 257f852
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions enhancements/cluster-logging/forwarder-input-selectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,40 +153,36 @@ Following are the additions to the InputSpec:
spec:
- name: my-infra
infrastructure:
include: ["node","container"]
sources: ["node","container"]

```
```golang
type Infrastructure struct {
Includes []InfrastructureSource
Sources []string
}


type InfrastructureSource string
const (
InfrastructureSourceNode InfrastructureSource = "node"
InfrastructureSourceContainer InfrastructureSource = "container"
InfrastructureSourceNode string = "node"
InfrastructureSourceContainer string = "container"
)
```
* Audit Input
```yaml
spec:
- name: my-audit
audit:
include: ["kubeAPI","openshiftAPI","auditd","ovn"]
sources: ["kubeAPI","openshiftAPI","auditd","ovn"]
```
```golang
type Audit struct {
Includes []AuditSource
Sources []string
}


type AuditSource string
const (
AuditSourceKube AuditSource = "kubeAPI"
AuditSourceOpenShift AuditSource = "openShiftAPI"
AuditSourceAuditd AuditSource = "auditd"
AuditSourceOVN AuditSource = "ovn"
AuditSourceKube string = "kubeAPI"
AuditSourceOpenShift string = "openShiftAPI"
AuditSourceAuditd string = "auditd"
AuditSourceOVN string = "ovn"
)
```

Expand All @@ -195,11 +191,11 @@ The operator will validate resources upon reconciliation of a **ClusterLogForwar


* The **ClusterLogForwarder** CR defines a valid spec
* Input spec fields that are "globs" (i.e. Namespace, container) match RE: '`[a-zA-Z0-9\*]*`'
* Input spec fields that are "globs" (i.e. Namespace, container) match RE: '`^[a-zA-Z0-9\*]*$`'
* Input field 'selector' is a valid metav1.LabelSelector
* Input enum fields accept only the values listed
* type "infrastructure" include specs at least one value
* type "audit" include specs at least one value
* type "infrastructure" sources specs at least one value
* type "audit" sources specs at least one value


##### Examples
Expand All @@ -224,7 +220,7 @@ Following is an example of a **ClusterLogForwarder** that redefines "infrastruct
- istio*
- name: my-node-logs
infrastructure:
include: ["node"]
sources: ["node"]
pipelines:
- inputRefs:
- my-infra-container-logs
Expand Down

0 comments on commit 257f852

Please sign in to comment.