-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: allow redis password secret creation and GitLab PeerAuthentica…
…tion exceptions (#161) ## Description This updates GL to be able to take in a Redis password and use Valkey in its test bundle. It also updates GL to have its own peer authentication exceptions if using internal psql / valkey > [!WARNING] > **Breaking Change**: the default connection to `dev-redis` has been changed to `valkey` - if you were using the `dev-redis` package you must update these values. ## Related Issue Relates to #150 ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [X] Test, docs, adr added or updated as needed - [X] [Contributor Guide Steps](https://github.com/defenseunicorns/uds-package-gitlab/blob/main/CONTRIBUTING.md#developer-workflow) followed Release-As: v17.1.1-uds.1
- Loading branch information
Showing
16 changed files
with
191 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{- if and .Values.postgres.internal (.Capabilities.APIVersions.Has "security.istio.io/v1beta1") }} | ||
apiVersion: "security.istio.io/v1beta1" | ||
kind: PeerAuthentication | ||
metadata: | ||
name: gitlab-postgres-peerauthentication-exception | ||
namespace: {{ .Values.postgres.namespace }} | ||
spec: | ||
mtls: | ||
mode: STRICT | ||
selector: | ||
matchLabels: | ||
{{ .Values.postgres.selector | toYaml }} | ||
portLevelMtls: | ||
# Postgres exception to support GitLab dependency init containers | ||
{{ .Values.postgres.port }}: | ||
mode: PERMISSIVE | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{- if and .Values.redis.internal (.Capabilities.APIVersions.Has "security.istio.io/v1beta1") }} | ||
apiVersion: "security.istio.io/v1beta1" | ||
kind: PeerAuthentication | ||
metadata: | ||
name: gitlab-redis-peerauthentication-exception | ||
namespace: {{ .Values.redis.namespace }} | ||
spec: | ||
mtls: | ||
mode: STRICT | ||
selector: | ||
matchLabels: | ||
{{ .Values.redis.selector | toYaml }} | ||
portLevelMtls: | ||
# Redis/Valkey exception to support GitLab dependency init containers | ||
{{ .Values.redis.port }}: | ||
mode: PERMISSIVE | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if ne .Values.redis.password "" }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: gitlab-redis | ||
namespace: {{ .Release.Namespace }} | ||
type: kubernetes.io/opaque | ||
stringData: | ||
password: {{ .Values.redis.password }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: "security.istio.io/v1beta1" | ||
kind: PeerAuthentication | ||
metadata: | ||
name: gitlab-postgres-peerauthentication-shim-exception | ||
namespace: postgres | ||
spec: | ||
mtls: | ||
mode: STRICT | ||
selector: | ||
matchLabels: | ||
cluster-name: pg-cluster | ||
portLevelMtls: | ||
# Postgres exception to support GitLab dependency init containers | ||
5432: | ||
mode: PERMISSIVE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: "security.istio.io/v1beta1" | ||
kind: PeerAuthentication | ||
metadata: | ||
name: gitlab-redis-peerauthentication-shim-exception | ||
namespace: valkey | ||
spec: | ||
mtls: | ||
mode: STRICT | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: valkey | ||
portLevelMtls: | ||
# Redis/Valkey exception to support GitLab dependency init containers | ||
6379: | ||
mode: PERMISSIVE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/defenseunicorns/zarf/main/zarf.schema.json | ||
# TODO: (@WSTARR) This will no longer be needed after the next release of GitLab | ||
kind: ZarfPackageConfig | ||
metadata: | ||
name: dev-peer-auth-shim | ||
version: "0.1.0" | ||
|
||
components: | ||
- name: gitlab-peer-auth-shim | ||
required: true | ||
manifests: | ||
- name: gitlab-peer-auth-shim | ||
files: | ||
- "postgres-peerauthentication.yaml" | ||
- "redis-peerauthentication.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters