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

Add persistent volume for future audit log #36

Merged
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
2 changes: 1 addition & 1 deletion charts/backstage/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ sources:
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.16.7
version: 2.16.8
2 changes: 1 addition & 1 deletion charts/backstage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# RHDH Backstage Helm Chart for OpenShift

[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/rhdh-chart&style=flat-square)](https://artifacthub.io/packages/search?repo=rhdh-chart)
![Version: 2.16.7](https://img.shields.io/badge/Version-2.16.7-informational?style=flat-square)
![Version: 2.16.8](https://img.shields.io/badge/Version-2.16.8-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A Helm chart for deploying Red Hat Developer Hub.
Expand Down
10 changes: 10 additions & 0 deletions charts/backstage/templates/pvc.yaml
coreydaley marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ printf "%s-audit-log" .Release.Name }}
spec:
rm3l marked this conversation as resolved.
Show resolved Hide resolved
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
10 changes: 10 additions & 0 deletions charts/backstage/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2530,6 +2530,10 @@
{
"mountPath": "/opt/app-root/src/dynamic-plugins-root",
"name": "dynamic-plugins-root"
},
{
"mountPath": "/var/log/audit",
"name": "audit-log-data"
}
],
"items": {
Expand Down Expand Up @@ -2588,6 +2592,12 @@
},
"name": "dynamic-plugins-root"
},
{
"name": "audit-log-data",
"persistentVolumeClaim": {
"claimName": "{{ printf \"%s-audit-log\" .Release.Name }}"
}
},
{
"configMap": {
"defaultMode": 420,
Expand Down
8 changes: 6 additions & 2 deletions charts/backstage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ upstream:
secretKeyRef:
key: postgres-password
name: '{{- include "janus-idp.postgresql.secretName" . }}'

args:
# This additional `app-config`` file is generated by the initContainer below, and contains the merged configuration of installed dynamic plugins.
- '--config'
Expand All @@ -119,6 +118,9 @@ upstream:
# The initContainer below will install dynamic plugins in this volume mount.
- name: dynamic-plugins-root
mountPath: /opt/app-root/src/dynamic-plugins-root
# Audit Log data will be stored in this volume mount.
- name: audit-log-data
mountPath: /var/log/audit
extraVolumes:
# -- Ephemeral volume that will contain the dynamic plugins installed by the initContainer below at start.
- name: dynamic-plugins-root
Expand All @@ -131,7 +133,9 @@ upstream:
requests:
# -- Size of the volume that will contain the dynamic plugins. It should be large enough to contain all the plugins.
storage: 2Gi

- name: audit-log-data
persistentVolumeClaim:
claimName: '{{ printf "%s-audit-log" .Release.Name }}'
# Volume that will expose the `dynamic-plugins.yaml` file from the `dynamic-plugins` config map.
# The `dynamic-plugins` config map is created by the helm chart from the content of the `global.dynamic` field.
- name: dynamic-plugins
Expand Down
Loading