-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Supports enabling namespaced ClusterLogForwarder resources. Enabling the feature requires redeploying the Cluster Logging Operator.
- Loading branch information
1 parent
55866f5
commit 9a8a65e
Showing
12 changed files
with
348 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
docs/modules/ROOT/pages/how-tos/enable-multi-forwarder.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
= Enable Multi LogForwarder | ||
|
||
Red Hat OpenShift Logging Operator only watches the `openshift-logging` namespace. | ||
If you want the Red Hat OpenShift Logging Operator to watch all namespaces on your cluster, you must redeploy the Operator. | ||
You can complete the following procedure to redeploy the Operator without deleting your logging components. | ||
|
||
|
||
== Disable ArgoCD sync | ||
|
||
Disable ArgoCD sync of component-openshift4-logging: | ||
[source,bash] | ||
---- | ||
kubectl --as=cluster-admin -n syn patch apps root --type=json \ | ||
-p '[{"op":"replace", "path":"/spec/syncPolicy", "value": {}}]' | ||
kubectl --as=cluster-admin -n syn patch apps openshift4-logging --type=json \ | ||
-p '[{"op":"replace", "path":"/spec/syncPolicy", "value": {}}]' | ||
---- | ||
|
||
== Remove Cluster Logging Opeartor Group | ||
|
||
1. Remove Subscription: | ||
+ | ||
[source,bash] | ||
---- | ||
kubectl --as=cluster-admin -n openshift-logging delete sub cluster-logging | ||
---- | ||
|
||
1. Remove OperatorGroup: | ||
+ | ||
[source,bash] | ||
---- | ||
kubectl --as=cluster-admin -n openshift-logging delete og cluster-logging | ||
---- | ||
|
||
1. Remove ClusterServiceVersion: | ||
+ | ||
[source,bash] | ||
---- | ||
kubectl --as=cluster-admin -n openshift-logging delete csv -l operators.coreos.com/cluster-logging.openshift-logging= | ||
---- | ||
|
||
== Enable namespaced LogForwarding | ||
|
||
1. Enable the following parameter in the tenant repo: | ||
+ | ||
[source,bash] | ||
---- | ||
parameters: | ||
openshift4_logging: | ||
namespaceLogForwarder: | ||
enabled: true | ||
---- | ||
|
||
1. Compile and push catalog | ||
|
||
|
||
== Enable ArgoCD sync | ||
|
||
NOTE: Make sure ArgoCD is refreshed before enabling the sync again. | ||
|
||
Enable ArgoCD sync of component-openshift4-logging: | ||
[source,bash] | ||
---- | ||
kubectl --as=cluster-admin -n syn patch apps root --type=json \ | ||
-p '[{ | ||
"op":"replace", | ||
"path":"/spec/syncPolicy", | ||
"value": {"automated": {"prune": true, "selfHeal": true}} | ||
}]' | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
tests/golden/master/openshift4-logging/openshift4-logging/32_namespace_logforwarding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
apiVersion: logging.openshift.io/v1 | ||
kind: ClusterLogForwarder | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: bar | ||
name: bar | ||
namespace: foo | ||
spec: | ||
inputs: | ||
- application: | ||
namespaces: | ||
- app-one | ||
- app-two | ||
name: my-apps | ||
outputs: | ||
- name: custom-forwarder | ||
type: syslog | ||
pipelines: | ||
- inputRefs: | ||
- my-apps | ||
name: my-apps | ||
outputRefs: | ||
- custom-forwarder | ||
serviceAccountName: ueli | ||
--- | ||
apiVersion: logging.openshift.io/v1 | ||
kind: ClusterLogForwarder | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: hands | ||
name: hands | ||
namespace: jazz | ||
spec: | ||
outputs: | ||
- name: splunk-forwarder | ||
secret: | ||
name: splunk-forwarder | ||
type: fluentdForward | ||
url: tls://splunk-forwarder:24224 | ||
pipelines: | ||
- inputRefs: | ||
- application | ||
name: application-logs | ||
outputRefs: | ||
- splunk-forwarder | ||
serviceAccountName: hands |
33 changes: 33 additions & 0 deletions
33
tests/golden/master/openshift4-logging/openshift4-logging/32_namespace_rolebinding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: ueli | ||
name: ueli | ||
namespace: foo | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: collect-application-logs | ||
subjects: | ||
- kind: ServiceAccount | ||
name: ueli | ||
namespace: foo | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: hands | ||
name: hands | ||
namespace: jazz | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: collect-application-logs | ||
subjects: | ||
- kind: ServiceAccount | ||
name: hands | ||
namespace: jazz |
Oops, something went wrong.