Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace metalk8s-loki storageclass with metalk8s one #2760

Merged
merged 6 commits into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion buildchain/buildchain/salt_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ def _get_parts(self) -> Iterator[str]:
Path('salt/metalk8s/addons/logging/loki/deployed/',
'service-configuration.sls'),
Path('salt/metalk8s/addons/logging/loki/deployed/services.sls'),
Path('salt/metalk8s/addons/logging/loki/deployed/storageclass.sls'),

Path('salt/metalk8s/addons/prometheus-adapter/deployed/chart.sls'),
Path('salt/metalk8s/addons/prometheus-adapter/deployed/init.sls'),
Expand Down
5 changes: 4 additions & 1 deletion charts/loki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ persistence:
- ReadWriteOnce
size: 10Gi
annotations: {}
storageClassName: metalk8s-loki
storageClassName: metalk8s
selector:
matchLabels:
app.kubernetes.io/name: loki
# subPath: ""
# existingClaim:

Expand Down
4 changes: 4 additions & 0 deletions charts/loki/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,9 @@ spec:
requests:
storage: {{ .Values.persistence.size | quote }}
storageClassName: {{ .Values.persistence.storageClassName }}
{{- if .Values.persistence.selector }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully, we don't forget this local patch during Loki chart upgrades...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's why I opened an upstream PR, I hope it'll be merged.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, I see the commit message now 👍

selector:
{{- toYaml .Values.persistence.selector | nindent 8 }}
{{- end }}
{{- end }}

2 changes: 1 addition & 1 deletion docs/installation/post-install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ path for the partitions to use:
name: <node_name>-loki
spec:
nodeName: <node_name>
storageClassName: metalk8s-loki
storageClassName: metalk8s
rawBlockDevice: # Choose a device with at least 10GiB capacity
devicePath: <device_path3>
template:
Expand Down
6 changes: 5 additions & 1 deletion examples/loki-sparse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ metadata:
name: NODE_NAME-loki
spec:
nodeName: NODE_NAME
storageClassName: metalk8s-loki
storageClassName: metalk8s
sparseLoopDevice:
size: 10Gi
template:
metadata:
labels:
app.kubernetes.io/name: loki
5 changes: 4 additions & 1 deletion salt/metalk8s/addons/logging/loki/deployed/chart.sls
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,13 @@ spec:
spec:
accessModes:
- ReadWriteOnce
selector:
matchLabels:
app.kubernetes.io/name: loki
resources:
requests:
storage: 10Gi
storageClassName: metalk8s-loki
storageClassName: metalk8s
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
Expand Down
2 changes: 1 addition & 1 deletion salt/metalk8s/addons/logging/loki/deployed/init.sls
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
include:
- ....storageclass.deployed
- .service-configuration
- .loki-configuration-secret
- .chart
- .services
- .storageclass
- .datasource
- .dashboard
18 changes: 0 additions & 18 deletions salt/metalk8s/addons/logging/loki/deployed/storageclass.sls

This file was deleted.

2 changes: 1 addition & 1 deletion tests/post/steps/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def _check_log_line_exists():

utils.retry(
_check_log_line_exists,
times=20,
times=40,
wait=3,
name="check that a log exists for 'logger' pod"
)
Expand Down