From c39d90bc2f796f2a3f014ce93d1af828f0779a6e Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Tue, 30 Jul 2024 16:39:20 -0600 Subject: [PATCH 1/4] feat: enable prometheus metrics to be Made for UDS --- .images/made-for-uds.svg | 225 ++++++++++++++++++++++++++++++++++++ README.md | 1 + values/upstream-values.yaml | 6 + values/values.yaml | 5 + zarf.yaml | 1 + 5 files changed, 238 insertions(+) create mode 100644 .images/made-for-uds.svg diff --git a/.images/made-for-uds.svg b/.images/made-for-uds.svg new file mode 100644 index 0000000..36b3524 --- /dev/null +++ b/.images/made-for-uds.svg @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md index 9d1bd48..75686f1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # 🏭 UDS Valkey Package +[Made for UDS](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) diff --git a/values/upstream-values.yaml b/values/upstream-values.yaml index 95422c9..e543c37 100644 --- a/values/upstream-values.yaml +++ b/values/upstream-values.yaml @@ -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 diff --git a/values/values.yaml b/values/values.yaml index 3d4a497..40117d7 100644 --- a/values/values.yaml +++ b/values/values.yaml @@ -3,3 +3,8 @@ architecture: standalone auth: existingSecret: valkey-password existingSecretPasswordKey: valkey-password + +metrics: + enabled: true + serviceMonitor: + enabled: true diff --git a/zarf.yaml b/zarf.yaml index 824a1f4..b1753e0 100644 --- a/zarf.yaml +++ b/zarf.yaml @@ -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 From f5d0e91772a8a07865e6a359721bb96af89911bc Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Tue, 30 Jul 2024 16:47:38 -0600 Subject: [PATCH 2/4] add docs --- docs/configuration.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 docs/configuration.md diff --git a/docs/configuration.md b/docs/configuration.md new file mode 100644 index 0000000..b91fee6 --- /dev/null +++ b/docs/configuration.md @@ -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 From 3d2c6497c639cfce4d6c6cdb01f72a6186a90078 Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Wed, 31 Jul 2024 08:38:28 -0600 Subject: [PATCH 3/4] change to moinitor key --- chart/templates/uds-package.yaml | 7 +++++++ values/values.yaml | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/chart/templates/uds-package.yaml b/chart/templates/uds-package.yaml index 7d36246..8c827d5 100644 --- a/chart/templates/uds-package.yaml +++ b/chart/templates/uds-package.yaml @@ -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 diff --git a/values/values.yaml b/values/values.yaml index 40117d7..d6d12fa 100644 --- a/values/values.yaml +++ b/values/values.yaml @@ -6,5 +6,3 @@ auth: metrics: enabled: true - serviceMonitor: - enabled: true From f931c54d742758d6f4749c10074579c0b9290bcf Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Wed, 31 Jul 2024 12:02:46 -0600 Subject: [PATCH 4/4] remote svg ref --- .images/made-for-uds.svg | 225 --------------------------------------- README.md | 2 +- 2 files changed, 1 insertion(+), 226 deletions(-) delete mode 100644 .images/made-for-uds.svg diff --git a/.images/made-for-uds.svg b/.images/made-for-uds.svg deleted file mode 100644 index 36b3524..0000000 --- a/.images/made-for-uds.svg +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/README.md b/README.md index 75686f1..a781e7e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 🏭 UDS Valkey Package -[Made for UDS](https://github.com/defenseunicorns/uds-core) +[Made for UDS](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)