Skip to content

Commit

Permalink
Merge pull request #559 from jlarriba/logging6
Browse files Browse the repository at this point in the history
[OSPRH-12147] Adapted logging to OCP 4.16 / CLO 6.1
  • Loading branch information
openshift-merge-bot[bot] authored Dec 18, 2024
2 parents d1fc706 + 57bd54f commit 1df1718
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 233 deletions.

This file was deleted.

39 changes: 27 additions & 12 deletions ci/deploy-logging-dependencies/files/cluster_log_forwarder.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
apiVersion: logging.openshift.io/v1
apiVersion: observability.openshift.io/v1
kind: ClusterLogForwarder
metadata:
name: instance
name: collector
namespace: openshift-logging
spec:
serviceAccount:
name: collector
inputs:
- name: syslog
receiver:
type: syslog
syslog:
- name: syslog-receiver
type: receiver
receiver:
type: syslog
port: 10514
outputs:
- name: default-lokistack
type: lokiStack
lokiStack:
authentication:
token:
from: serviceAccount
target:
name: logging-loki
namespace: openshift-logging
tls:
ca:
key: service-ca.crt
configMapName: openshift-service-ca.crt
pipelines:
- name: to-default
inputRefs:
- syslog
- application
outputRefs:
- default
- name: my-syslog
inputRefs:
- syslog-receiver
outputRefs:
- default-lokistack
12 changes: 0 additions & 12 deletions ci/deploy-logging-dependencies/files/cluster_logging.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions ci/deploy-logging-dependencies/files/operators.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ metadata:
name: loki-operator
namespace: openshift-operators-redhat
spec:
channel: stable-5.9
channel: stable-6.1
installPlanApproval: Automatic
name: loki-operator
source: redhat-operators
Expand All @@ -47,7 +47,7 @@ metadata:
name: cluster-logging
namespace: openshift-logging
spec:
channel: stable-5.9
channel: stable-6.1
installPlanApproval: Automatic
name: cluster-logging
source: redhat-operators
Expand Down
19 changes: 0 additions & 19 deletions ci/deploy-logging-dependencies/tasks/deploy-cluster-logging.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
- name: Create cluster logging
ansible.builtin.shell:
cmd: |
oc apply -f {{ role_path }}/files/cluster_logging.yaml -n openshift-logging
- name: Wait for cluster logging to be created
ansible.builtin.command:
cmd:
oc get clusterlogging --namespace=openshift-logging instance
delay: 10
retries: 20
register: output
until: output.stdout_lines | length != 0

- name: Wait for the cluster logging to be ready
ansible.builtin.command:
cmd: |
oc wait --timeout=300s --for condition=Ready=True --namespace=openshift-logging clusterlogging instance
- name: Create cluster log forwarder
ansible.builtin.shell:
cmd: |
Expand Down
6 changes: 3 additions & 3 deletions pkg/logging/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ func Service(
TargetPort: intstr.FromInt(instance.Spec.TargetPort),
}}
service.Spec.Selector = map[string]string{
"app.kubernetes.io/instance": "collector",
"component": "collector",
"provider": "openshift",
"app.kubernetes.io/component": "collector",
"app.kubernetes.io/name": "vector",
"app.kubernetes.io/part-of": "cluster-logging",
}
service.Annotations = instance.Spec.Annotations
service.Labels = labels
Expand Down
6 changes: 3 additions & 3 deletions tests/kuttl/suites/logging/tests/00-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ spec:
protocol: TCP
targetPort: 10514
selector:
app.kubernetes.io/instance: collector
component: collector
provider: openshift
app.kubernetes.io/component: collector
app.kubernetes.io/name: vector
app.kubernetes.io/part-of: cluster-logging
type: LoadBalancer

---
Expand Down

0 comments on commit 1df1718

Please sign in to comment.