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

feat: enable prometheus metrics to be Made for UDS #28

Merged
merged 5 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
225 changes: 225 additions & 0 deletions .images/made-for-uds.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 🏭 UDS Valkey Package

[<img alt="Made for UDS" src="./.images/made-for-uds.svg" height="20px"/>](https://github.com/defenseunicorns/uds-core)
[![Latest Release](https://img.shields.io/github/v/release/defenseunicorns/uds-package-valkey)](https://github.com/defenseunicorns/uds-package-valkey/releases)
[![Build Status](https://img.shields.io/github/actions/workflow/status/defenseunicorns/uds-package-valkey/tag-and-release.yaml)](https://github.com/defenseunicorns/uds-package-valkey/actions/workflows/tag-and-release.yaml)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/defenseunicorns/uds-package-valkey/badge)](https://api.securityscorecards.dev/projects/github.com/defenseunicorns/uds-package-valkey)
Expand Down
7 changes: 7 additions & 0 deletions chart/templates/uds-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ metadata:
name: valkey
namespace: {{ .Release.Namespace }}
spec:
monitor:
- selector:
app.kubernetes.io/name: valkey
targetPort: 9121
portName: http-metrics
description: Metrics

network:
allow:
- direction: Ingress
Expand Down
18 changes: 18 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Configuration

Valkey configured through the upstream [Bitnami Valkey chart](https://github.com/bitnami/charts/tree/main/bitnami/valkey) as well as a UDS configuration chart that supports the following:

## Networking

Network policies are controlled via the `uds-valkey-config` chart in accordance with the [common patterns for networking within UDS Software Factory](https://github.com/defenseunicorns/uds-software-factory/blob/main/docs/networking.md). Because Valkey does not interact with external resources like databases or object storage it only implements `custom` networking for the `valkey` namespace:

- `custom`: sets custom network policies for the `valkey` namespace (i.e. to allow clients like GitLab to connect)

## Cross-Namespace Password

Valkey is currently configured to expect a single user or workload to be using it - to enable this workload to exist in another namespace without needing elevated permissions itself, the `uds-valkey-config` chart supports the following keys to place the Valkey password in another namespace:

- `copyPassword.enabled`: enables the copying of the Valkey password secret to another namespace
- `copyPassword.namespace`: the namespace to copy the Kubernetes secret into
- `copyPassword.secretName`: the name to give the Kubernetes secret in the other namespace
- `copyPassword.secretKey`: the key to place the password under within the Kubernetes secret
6 changes: 6 additions & 0 deletions values/upstream-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ image:
registry: docker.io
repository: bitnami/valkey
tag: 7.2.5-debian-12-r6

metrics:
image:
registry: docker.io
repository: bitnami/redis-exporter
tag: 1.62.0-debian-12-r2
3 changes: 3 additions & 0 deletions values/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ architecture: standalone
auth:
existingSecret: valkey-password
existingSecretPasswordKey: valkey-password

metrics:
enabled: true
1 change: 1 addition & 0 deletions zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ components:
- ./values/upstream-values.yaml
images:
- docker.io/bitnami/valkey:7.2.5-debian-12-r6
- docker.io/bitnami/redis-exporter:1.62.0-debian-12-r2