Skip to content

Commit 11c4527

Browse files
acidonperTim Steffens
and
Tim Steffens
authored
Updated to Openshift 4.18+ and Openshift Logging (6.2) (#173)
* Updated tl500 base helm chart to add cluster observability operator and new openshift logging version 6.2 * Updated tl500-course-content Helm chart to upgrade openshift cluster logging to version 6.2 * exclude extracted subcharts and Mac foo * add operator group for cluster-observability-operator * Update .gitignore Removed unnecessary lines --------- Co-authored-by: Tim Steffens <[email protected]>
1 parent a53a57d commit 11c4527

14 files changed

+120
-117
lines changed

tooling/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*.tgz
22
*.lock
3+
4+
.DS_Store

tooling/README.md

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This directory contains the necessary charts used in order to deploy a TL500 Tech Stack against an OCP 4.X cluster. This assumes that the cluster has valid certificates.
44

5-
🐞 Please ensure your cluster is the latest Z release - 4.10.z or 4.11.z release. We test against these. 🐞
5+
🐞 Please ensure your cluster is the latest Z release - 4.18.z. We test against these. 🐞
66

77
This chart is capable of deploying the following:
88

@@ -12,7 +12,7 @@ This chart is capable of deploying the following:
1212
- SealedSecrets from Bitnami
1313
- OpenShift Pipelines
1414
- Advanced Cluster Security (StackRox)
15-
- Cluster Logging (ELK)
15+
- Cluster Logging (LokiStack)
1616
- Certificate Utils
1717
- GitOps Operator (ArgoCD)
1818

@@ -30,7 +30,7 @@ When specifying a chart version, make sure to use the same version for both char
3030

3131
1. Install TL500 Base
3232

33-
For 4.10.z OpenShift:
33+
For 4.18.z OpenShift:
3434

3535
```bash
3636
helm repo add enablement-framework https://rht-labs.com/enablement-framework
@@ -39,15 +39,9 @@ helm search repo enablement-framework
3939
helm install tl500-base enablement-framework/tl500-base --version XYZ --namespace tl500 --create-namespace --timeout=15m
4040
```
4141

42-
When deploying to OpenShift 4.11.z+ or 4.12.z+ there are some breaking changes in newer OpenShift versions, specifically around DevSpaces operator. Use the newer values file:
43-
44-
```bash
45-
helm install tl500-base enablement-framework/tl500-base -f tl500-base/values-v4.11+.yaml --version XYZ --namespace tl500 --create-namespace --timeout=15m
46-
```
47-
4842
2. Install TL500 Course Content
4943

50-
For 4.10.z OpenShift:
44+
For 4.18.z OpenShift:
5145

5246
```bash
5347
helm repo add enablement-framework https://rht-labs.com/enablement-framework
@@ -56,12 +50,6 @@ helm search repo enablement-framework
5650
helm install tl500-course-content enablement-framework/tl500-course-content --version XYZ --namespace tl500 --create-namespace --timeout=15m
5751
```
5852

59-
When deploying to OpenShift 4.11.z+ or 4.12.z+ there are some breaking changes in newer OpenShift versions, specifically around DevSpaces operator. Use the newer values file:
60-
61-
```bash
62-
helm install tl500-course-content enablement-framework/tl500-course-content -f tl500-base/values-v4.11+.yaml --version XYZ --namespace tl500 --create-namespace --timeout=15m
63-
```
64-
6553
## Using the helm chart source code
6654

6755
1. Get the source code
@@ -104,7 +92,6 @@ After this is deployed, you will have a functional gitlab server that can be use
10492

10593
With CRW, this uses the provided Operator to deploy a CRW instance. With the provided defaults, it restricts uses to two workspaces and allows for only a single `running` instance.
10694

107-
10895
## Running on infra nodes
10996

11097
To run on an infra node (currenly only AWS supported) you can enable this by setting `runOnInfra: true`. This assumes 1) there is at least one infra node configured with the label `node-role.kubernetes.io/infra: ""`.

tooling/charts/tl500-base/Chart.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: tl500-base
33
description: A Helm chart for Kubernetes
44
type: application
5-
version: 0.0.2
5+
version: 0.0.3
66
appVersion: 0.0.1
77
maintainers:
88
- name: eformat
@@ -11,6 +11,7 @@ maintainers:
1111
- name: jtudelag
1212
- name: ckavili
1313
- name: springdo
14+
- name: acidonper
1415
dependencies:
1516
- name: sealed-secrets
1617
version: "2.8.2"

tooling/charts/tl500-base/templates/logging/namespace.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,10 @@ metadata:
1212
name: openshift-operators-redhat
1313
labels:
1414
openshift.io/cluster-monitoring: "true"
15+
---
16+
apiVersion: v1
17+
kind: Namespace
18+
metadata:
19+
name: openshift-cluster-observability-operator
20+
labels:
21+
openshift.io/cluster-monitoring: "true"

tooling/charts/tl500-base/values.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ operators:
4646
enabled: true
4747
namespace: openshift-logging
4848
subscription:
49-
channel: stable-5.9
49+
channel: stable-6.2
5050
approval: Automatic
5151
operatorName: cluster-logging
5252
sourceName: redhat-operators
@@ -55,11 +55,24 @@ operators:
5555
create: true
5656
targetNamespace: AllNamespaces
5757

58+
cluster-observability-operator:
59+
enabled: true
60+
namespace: openshift-cluster-observability-operator
61+
subscription:
62+
channel: stable
63+
approval: Automatic
64+
operatorName: cluster-observability-operator
65+
sourceName: redhat-operators
66+
sourceNamespace: openshift-marketplace
67+
operatorgroup:
68+
create: true
69+
targetNamespace: AllNamespaces
70+
5871
loki-operator:
5972
enabled: true
6073
namespace: openshift-operators-redhat
6174
subscription:
62-
channel: stable-5.9
75+
channel: stable-6.2
6376
approval: Automatic
6477
operatorName: loki-operator
6578
sourceName: redhat-operators

tooling/charts/tl500-course-content/Chart.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ apiVersion: v2
22
name: tl500-course-content
33
description: A Helm chart for Kubernetes
44
type: application
5-
version: 0.0.7
5+
version: 0.0.8
66
appVersion: 0.0.1
77
maintainers:
88
- name: eformat
99
- name: jacobsee
1010
- name: jtudelag
1111
- name: ckavili
1212
- name: springdo
13+
- name: acidonper
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: observability.openshift.io/v1
2+
kind: ClusterLogForwarder
3+
metadata:
4+
name: instance
5+
namespace: {{ .Values.logging.namespace }}
6+
spec:
7+
serviceAccount:
8+
name: {{ .Values.logging.sa }}
9+
outputs:
10+
- name: lokistack-out
11+
type: lokiStack
12+
lokiStack:
13+
target:
14+
name: {{ .Values.logging.loki_name }}
15+
namespace: {{ .Values.logging.namespace }}
16+
authentication:
17+
token:
18+
from: serviceAccount
19+
tls:
20+
ca:
21+
key: service-ca.crt
22+
configMapName: openshift-service-ca.crt
23+
pipelines:
24+
- name: infra-app-logs
25+
inputRefs:
26+
- application
27+
- infrastructure
28+
outputRefs:
29+
- lokistack-out

tooling/charts/tl500-course-content/templates/logging/clusterlogging.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRoleBinding
3+
metadata:
4+
name: collect-application-logs
5+
roleRef:
6+
apiGroup: rbac.authorization.k8s.io
7+
kind: ClusterRole
8+
name: collect-application-logs
9+
subjects:
10+
- kind: ServiceAccount
11+
name: {{ .Values.logging.sa }}
12+
namespace: {{ .Values.logging.namespace }}
13+
---
14+
apiVersion: rbac.authorization.k8s.io/v1
15+
kind: ClusterRoleBinding
16+
metadata:
17+
name: collect-infrastructure-logs
18+
roleRef:
19+
apiGroup: rbac.authorization.k8s.io
20+
kind: ClusterRole
21+
name: collect-infrastructure-logs
22+
subjects:
23+
- kind: ServiceAccount
24+
name: {{ .Values.logging.sa }}
25+
namespace: {{ .Values.logging.namespace }}
26+
---
27+
apiVersion: rbac.authorization.k8s.io/v1
28+
kind: ClusterRoleBinding
29+
metadata:
30+
name: logging-collector-logs-writer
31+
roleRef:
32+
apiGroup: rbac.authorization.k8s.io
33+
kind: ClusterRole
34+
name: logging-collector-logs-writer
35+
subjects:
36+
- kind: ServiceAccount
37+
name: {{ .Values.logging.sa }}
38+
namespace: {{ .Values.logging.namespace }}

tooling/charts/tl500-course-content/templates/logging/consolepluginjob.yaml

Lines changed: 0 additions & 75 deletions
This file was deleted.

tooling/charts/tl500-course-content/templates/logging/lokistack.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: loki.grafana.com/v1
33
kind: LokiStack
44
metadata:
5-
name: logging-loki
5+
name: {{ .Values.logging.loki_name }}
66
namespace: {{ .Values.logging.namespace }}
77
spec:
88
size: 1x.extra-small
@@ -12,4 +12,4 @@ spec:
1212
type: s3
1313
storageClassName: {{ .Values.logging.storageclass }}
1414
tenants:
15-
mode: openshift-logging
15+
mode: {{ .Values.logging.namespace }}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
kind: ServiceAccount
3+
apiVersion: v1
4+
metadata:
5+
name: "{{ .Values.logging.sa }}"
6+
namespace: "{{ .Values.logging.namespace }}"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: observability.openshift.io/v1alpha1
2+
kind: UIPlugin
3+
metadata:
4+
name: logging
5+
spec:
6+
type: Logging
7+
logging:
8+
lokiStack:
9+
name: {{ .Values.logging.loki_name }}
10+
logsLimit: 50
11+
timeout: 30s

tooling/charts/tl500-course-content/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ logging:
1212
namespace: openshift-logging
1313
# lokistack configuration requires the sc name. If you are deploying outside of AWS, make sure you update this value
1414
storageclass: gp3-csi
15+
loki_name: logging-loki
16+
sa: logging-collector
1517
tolerations:
1618
- effect: NoSchedule
1719
key: node-role.kubernetes.io/infra

0 commit comments

Comments
 (0)