Skip to content

Commit 6839989

Browse files
authored
[FIX] OpenShift: Configure sidecars to use port 3001 and https (#737)
1 parent d59a29c commit 6839989

File tree

7 files changed

+25
-5
lines changed

7 files changed

+25
-5
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# SAS Viya Monitoring for Kubernetes
22

3-
## Unreleased
3+
4+
## unreleased
5+
* **Metrics**
6+
* [FIX] Corrected bugs related to authentication/TLS configuration of Grafana sidecars on OpenShift which prevented auto-provisioning of
7+
datasources and dashboards
8+
* **Logging**
49
* [UPGRADE] Fluent Bit upgraded from 3.2.6 to 3.2.10 (includes security fixes)
510
* [UPGRADE] Fluent Bit Helm chart upgraded from 0.48.6 to 0.48.9
611

monitoring/bin/deploy_monitoring_openshift.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ if [ "$OPENSHIFT_AUTH_ENABLE" == "true" ]; then
163163
extraArgs="--set service.targetPort=3001"
164164
else
165165
grafanaAuthYAML="monitoring/openshift/grafana-tls-only-values.yaml"
166-
log_debug "Creating the Grafana service to generate TLS certs..."
166+
#Creating the service now b/c certs will be generated and must exist prior to pod starting
167+
log_debug "Creating the Grafana service; annotations will trigger generation of TLS certs."
167168
kubectl apply -n $MON_NS -f monitoring/openshift/v4m-grafana-svc.yaml
168169
log_debug "Sleeping 5 sec..."
169170
sleep 5

monitoring/grafana-datasource-opensearch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: 1
2-
deleteDatasources:
2+
deleteDatasources:
33
- name: ViyaLogs
44
prune: true
55
datasources:

monitoring/openshift/grafana-proxy-values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
disable_login_form: true
66
disable_signout_menu: true
77
"auth.basic":
8-
enabled: false
8+
enabled: true
99
"auth.proxy":
1010
auto_sign_up: true
1111
enabled: true

monitoring/openshift/grafana-tls-only-values.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ extraSecretMounts:
1717
readOnly: true
1818
subPath: ""
1919

20+
sidecar:
21+
dashboards:
22+
reloadURL: "https://localhost:3001/api/admin/provisioning/dashboards/reload"
23+
env:
24+
REQ_SKIP_TLS_VERIFY: true
25+
datasources:
26+
defaultDatasourceEnabled: false
27+
reloadURL: "https://localhost:3001/api/admin/provisioning/datasources/reload"
28+
env:
29+
REQ_SKIP_TLS_VERIFY: true
30+
2031
service:
2132
enabled: false
2233

monitoring/openshift/grafana-values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,5 @@ testFramework:
7878
mode: console
7979
"log.console":
8080
format: json
81+
"auth.basic":
82+
enabled: true

monitoring/openshift/v4m-grafana-svc.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ metadata:
77
service.beta.openshift.io/serving-cert-secret-name: v4m-grafana-tls-secret
88
labels:
99
app.kubernetes.io/name: grafana
10-
app.kubernetes.io/version: 9.5.5
10+
app.kubernetes.io/instance: v4m-grafana
1111
spec:
1212
ports:
1313
- name: service
1414
port: 80
1515
protocol: TCP
1616
targetPort: 3001
1717
selector:
18+
app.kubernetes.io/instance: v4m-grafana
1819
app.kubernetes.io/name: grafana
1920
sessionAffinity: None
2021
type: ClusterIP

0 commit comments

Comments
 (0)